0

Is there a native functionality for additional languages in EE4 or should we go for an addon for a site with LTR and RTL languages?

Please share your experiences.

  • I wish EE would give ML as a native feature. Unfortunately it is not. You have to use Publisher module. (That is not cheap at all) – Mufi - Amici Infotech Sep 17 '18 at 4:47
  • 1
    Was expecting ML as native feature. Craft has something like that native. It's a shame. – Noor M Sep 17 '18 at 7:08
  • Craft has many more features in native.. Image manipulations like ce_image, Powerful Search like low search, Pages management Like Structure, Caches like Ce_cache, ML like Transcribe, Route definition from backend, Matrix > Supertable > Matrix loop and much more. – Mufi - Amici Infotech Sep 17 '18 at 9:48
  • Unfortunately EE don't have such features as native. But developers of mentioned plugin work really hard to add those great features – Mufi - Amici Infotech Sep 17 '18 at 9:49
1

okay it seems you are into this too. if you want to spend 200$ use https://boldminded.com/add-ons/publisher-2

if not; here is the tips for an easy way to do it. lets say that you have two languages English - en Arabic - ar

first duplicate your fields in your channels and make sure that you suffix the field name with the short-code of your language Like:

{title_ar} {body_en} {body_ar}

if you need categories add a custom field for your categories lets say the English is your default language : {category_name_ar}

if you have variable; you can use the suffix too, like: {home_en} : home {home_ar} : الرئيسية

=== in you blog template === use the template routs and make sure the segment_1 as the language short-code like: template group Blog/index

/{lang:regex[(en|ar)]}/blog/{section:category}/{page:pagination}

now the url of the "Blog" will be like: https://localhost/ar/blog/ https://localhost/en/blog/

in your template the code will be like this:

   <ul>
      <li>{home_{segment:lang}}</li>
    {!-- this will translate the variable upon requested URL --}
    </ul>



 {exp:channel:categories}
        <a href="{path='{segment:lang}/blog/'}">
    {if segment_1 == "ar"}
{category_name_ar}
{if:else}
{category_name}
{/if}
    </a>
    {/exp:channel:categories}

    {exp:channel:entries channel="blog" }
<h2> 
  {if segment_1 == "ar"}
    {title_ar}
    {if:else}
    {title}
    {/if}
</h2>

<p>{body_{segment:lang}}</p>
 {/exp:channel:entries}

there is many ways to do so this is the easiest way to do it natively

hope you find this useful

| improve this answer | |
  • I’ve followed the same principle for many sites now but with a global_variable. Template code is then without if / ifelse conditionals. There is a article here eeinsider.com/articles/… – Hansl Sep 19 '18 at 5:31
  • GREAT I know it, it is better to work with republiclabs.com/expressionengine/republic-variables, in the past EE4 seems fadeout, developers are running away. no more porting one company is Monopoly add-ons. I am shifting to Craft – Akwad Net Sep 19 '18 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.