5

This is my first multi language project and should be very simple. The only dinamic content is for blog, but it doesn't need to be translated. I thought to take these steps, i would like to have some opinion if I'm doing something wrong

Templates:

For the main language:

  • /index
  • /contatti
  • /blog
  • etc..

For english language i create the template_group "en"

  • en/index
  • en/contact
  • en/blog

Global variables/embed templates

i.e.

  • "head_html" and "en_head_html"
  • "body" "en_body"
  • etc...

Is this correct or i'm doing something wrong? Are there better methods for a simple situation like this? Thanks in advance

2

You can have some guidance from http://www.sidd3.com/multi-language-website-with-expressionengine/

Hope, it would help you.

| improve this answer | |
  • Hi @Bhashkar , i've a problem with language_code global variable. Following your guide, i inserted the code at the and of index.php and en/index.php. I created two snippet, one for english language and one for italian, and then inserted them to my template, but it doesn't work – migliorosso Apr 14 '13 at 15:01
  • The snippets are menu_it and menu_en and i inserted them with {menu_{language_code}} – migliorosso Apr 14 '13 at 15:24
  • The {language_code} tag isn't parsing. In the index.php, the language global variables should be always above this line of code: require_once BASEPATH.'core/CodeIgniter'.EXT; I have updated this instruction within my blog. – Bhashkar Yadav Apr 14 '13 at 18:07
  • now it works perfectly :) – migliorosso Apr 15 '13 at 5:12
3

In addition to the tips provided in the link Bhashkar provided, I would strongly recommend you have a look at Low Variables - it's a terrifically powerful add-on that gives you the ability to simultaneously create language-version variables as you create them, which when coupled with the language segment global system variables you'd likely create as directed in the article above, becomes a very fast and efficient way to use a single template to conditionally load language-specific content, both static variables, as well as entries.

| improve this answer | |
2

Just started a repo on Github for a multilingual text fieldtype I'm working on which could help you out, or at least give you some more options : Babeltext

| improve this answer | |
  • I looked at this field type. Really seems great. – Bhashkar Yadav Jul 4 '13 at 9:40
  • Thanks. I just have to incorporate the compatibility with other modules and fieldtypes and I'm probably going to make it available on Devotee. – pseudoclass Jul 10 '13 at 9:23
  • That would be great... – Bhashkar Yadav Jul 12 '13 at 9:07
1

Here's my practical approach http://digitalevangelist.net/blog/multi-lingual-expressionengine-practical

I used Freebie and Republic Variables mainly

| improve this answer | |
1

I used Publisher add-on and worked great. Gives you the options to see which entries have a translation in draft or published form when you are in the entry list.

I'm still trying to import a Data Base and relate the entries to their translation, but Brian Litzinger, the developer has been very helpful in answering some previous questions.

| improve this answer | |

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.