Multi Language Module
*** Update: now compatible with EE2.0
The Multi Language Module is an Expression Engine add-on that allows you to create phrases in multiple languages, which you can then display in your site templates and call from other add-ons. It comes with 3 languages by default (English, Spanish, Italian) but you can add and delete languages as you please.
Support can be found in the comments and in this EE forum thread.
Current Version: 2.0 (released 9 June 2010)
* Works with ExpressionEngine 2.0 and ExpressionEngine 1.6
1. Concept
To create a phrase you simply enter a phrase index and add the phrase in as many languages as you want.
To display a phrase, you simply use an expression of the format {exp:multi_language:phrase index="hello"}. Depending on the user's language, this will appear as "hello", "hola", "ciao", etc., assuming you have already entered these translations.
The user's language is determined by the url. So for a webpage at mysite.com/links/ the italian version will be at mysite.com/it/links/. This makes for easy navigation and setup in Expression Engine.
2. How It Works
The Multi Language Module uses a global variable in the path.php file to determine the current language. This is then used to retrieve phrases and weblog entries in the user's current language.
Setting the Global Variables in EE2.0
First, open up the index.php file in your website's root directory. Uncomment and set the global variables in the following line:
$assign_to_config['global_vars'] = array( "base_url" => "http://www.mysite.com/", "user_language" => "en" );
Change mysite.com to your domain. In this case English (en) is your default language.
Each new language requires a folder, for example "es" for Spanish, to be created in your website's root directory. Create a directory, copy the index.php file from your root directory and make the following changes (example for Spanish):
$assign_to_config['global_vars'] = array( "base_url" => "http://www.mysite.com/es/", "user_language" => "es" );
Setting the Global Variables in EE1.6
First, open up the path.php file in your website's root directory. Set the global variables in the last line:
$global_vars = array( "base_url" => "http://www.mysite.com/", "user_language" => "en" );
Change mysite.com to your domain. In this case English (en) is your default language.
Each new language requires a folder, for example "es" for Spanish, to be created in your website's root directory. Open the path.php file in that directory and set the global variables as follows:
$global_vars = array( "base_url" => "http://www.mysite.com/es/", "user_language" => "es" );
You will now have two new global variables available to you in your templates and add-ons.
base_url can be used for adding links in your templates while keeping the language in your url.
user_language contains the current language.
Creating and retrieving multi-lingual phrases
Phrases can easily be created on the Multi Language Module page. Just enter a phrase index, which will be used to reference the phrase, and then enter it in as many languages as you want.
To retrieve a phrase in the templates, use {exp:multi_language:phrase index="hello"}, replacing hello with the phrase index.
Multi-lingual Weblogs
Weblogs can be easily set up to handle multi-lingual fields. For each new language, just add a custom weblog field for title and body.
To add Spanish for example, add one custom field called title_es and one called body_es. These can then be used to hold the translations of the default title and body fields.
Then in your templates use the following method for calling weblogs:
{exp:weblog:entries weblog="my_weblog"}
{if user_language == "en"}{title}{if:else}{title_{user_language}}{/if}
{if user_language == "en"}{body}{if:else}{body_{user_language}}{/if}
{/exp:weblog:entries}
Switching Languages
You can switch language using javascript and php, but in my opinion the best way is to use a permanent link (for SEO purposes):
<a href="{site_url}{if segment_1}{segment_1}/{/if}{if segment_2}{segment_2}/{/if}{if segment_3}{segment_3}/{/if}">View site in English</a>
<a href="{site_url}es/{if segment_1}{segment_1}/{/if}{if segment_2}{segment_2}/{/if}{if segment_3}{segment_3}/{/if}">Ver sitio en Espańol</a>
Removing index.php from your URL
If you use the exclude list method to remove index.php from your URL then you must add each language as an exception to the rule. For example:
RewriteEngine on RewriteCond $1 !^(es|it|images|system|themes|index\.php) [NC] RewriteRule ^(.*)$ /index.php/$1 [L]
The language directories already include a .htaccess file that removes index.php.
3. Installation
Download and unzip multi_language.zip, then follow the steps below.
For EE2.0
- Open the multi_language_2_0 folder
- Upload the multi_language folder to the system/expressionengine/third_party folder
- Add two new global variables to the index.php file in the root directory of your site, changing mysite.com to your domain:
$assign_to_config['global_vars'] = array( "base_url" => "http://www.mysite.com/", "user_language" => "en" );
- Create language folders such as es and it in the root directory of your site, changing system_path if necessary and mysite.com to your domain in the index.php file in each folder
- Duplicate the es folder for each new language you want, changing user_language to your domain in index.php, and upload it to the root directory of your site
- Install the Multi Language module
- Add or delete languages in the module (add labels for new languages in the lang.multi_language.php file)
- Start adding phrases in the module
- You can replace
{path=home}with{base_url}homein your templates to maintain the user's language in links
For EE1.6
- Open the multi_language_1_6 folder
- Upload the multi_language folder to the system/modules folder
- Upload lang.multi_language.php to the system/language/english folder
- Add two new global variables to the path.php file in the root directory of your site, changing mysite.com to your domain:
$global_vars = array( "base_url" => "http://www.mysite.com/", "user_language" => "en" );
- Upload the es and it folders to the root directory of your site (if you want those languages), changing system_path if necessary and mysite.com to your domain in the path.php file in each folder
- Duplicate the es folder for each new language you want, changing user_language to your domain in path.php, and upload it to the root directory of your site
- Install the Multi Language module (Control Panel -> Modules -> Install)
- Add or delete languages in the module (add labels for new languages in the lang.multi_language.php file)
- Start adding phrases in the module
- You can replace
{path=home}with{base_url}homein your templates to maintain the user's language in links
4. Download
Each individual license costs $39.95, which allows you to use the module on one installation of EE. You must purchase a license in order to download the Multi Language Module. Once you have completed payment you will be sent a code that will allow you to download the file.
*** Non-profit organisations, students and anyone who would like to exchange something for this module, email me at and you can have it for free!
By purchasing the Multi Language Module you agree to the license agreement.
If you have already purchased the Multi Language Module then you can download it by entering your email and code below.
5. License
By purchasing the Multi Language Module you agree to the following conditions:
- One license grants the right to perform one installation of the Multi Language Module. Each additional installation requires an additional purchased license.
- You may not reproduce, distribute, sell or transfer the Multi Language Module, or portions thereof, to any third party.
- All copyright and proprietary notices within the Multi Language Module files must remain intact and unaltered.
- The Multi Language Module is provided "as is", without warranty of any kind.
- You assume all risk associated with the installation and use of the Multi Language Module.
6. Changelog
Version 2.0- Converted to an EE 2.0 compatible module (both versions available in download)
- Fixed a bug which showed an update notification when no update was available
- Made remove and add language buttons visible when no phrases exist



7. Comments
Tim
09 January 2009
Hello,
just bought your multi language extension. I'm installing it, but I cannot find the configuration setting mentioned in "(7) Add or delete language in the module".
Can you help urgently?
thx,
Tim
Ben
09 January 2009
hi tim,
when you go to the multi language module page you will see a table containing the phrases you have entered. at the top of the table, next to each language is a remove link which removes that language. on the right hand side there is the add language link.
Tim
09 January 2009
Hello Ben,
thanks for the lightning fast answer... I see it know, but it's really well hidden in case of a new install since you have to have at least 1 entry before the language are shown.
Something you might want to consider to change in following versions... not necessary for me anymore though, since I know it now.
have a nice weekend,
Tim.
Ben
10 January 2009
thanks for the tip, i'll fix it in next release
Jim Pannell
13 January 2009
This looks great Ben and will definitely be useful for the multilingual sites I'm working on!
Nathan
14 January 2009
Hello Ben,
I just downloaded your extension and I'm having some trouble getting it installed. I've copied the language files to my system/language folder but when I attempt to put in one of the urls, for example mysite.com/es/ I'm getting a 404 error. Am I missing something?
I'm new to the whole Expression Engine setup so a more detailed walkthrough on how to fully install this would be VERY MUCH APPRECIATED.
Thank you so much for your time!
Nathan
14 January 2009
I figured it out! For some reason when you extract folders or files for use on the web from a zip file it screws up the permissions. Simply re-create the files and folders then copy and paste the info into them and poof! Your web server will have access to the files.
Ben
14 January 2009
hi nathan, i was just replying to your previous comment when i saw this, glad you got it working!
Nathan
14 January 2009
My next question is, should the Global Variables be loaded by themselves once entered into the path file or do I need to create them myself through the template tab? I ask because they aren't automatically there and I'm not sure what info is needed to create them myself.
Ben
14 January 2009
yes the global variables will be loaded directly from the path.php file, no need to create them again.
Nathan
14 January 2009
WoW Ben, thanks for the incredibly speedy response. I'm sorry to pester but it's a very large project I'm working on atm and if I can get this working properly you can expect me to be purchasing SEVERAL more licenses.
The Global Variables are not being loaded automatically but everything seems to be done correctly and I've followed your directions to the T. Any ideas as to what could be causing this problem?
Ben
14 January 2009
no problem, glad to help out. which global variables specifically are not being loaded, how are you testing this, and have you added them in the appropriate folder?
Nathan
14 January 2009
"You will now have two new global variables available to you in your templates and add-ons."
base_url & user_language are the two that were mentioned.
I'm testing this on a local drive and I placed the variables in the path.php file in my root folder. I've also changed the base_url reference in the path.php files in the language folders to the correct link. I'm sure the php is working correctly as well as it has been tested.
Ben
14 January 2009
so what happens when you, for example, put {user_language} in a template? what is rendered?
Nathan
14 January 2009
It displays an "en" at the top of the page. I'm assuming this is what it's supposed to do, right? I didn't see that until you had me test it.
Ben
14 January 2009
yes, seems to be working alright
Nathan
14 January 2009
Excellent! I switched to my spanish view and the text changed as well, just as promised! Now it's up to me to simply implement it correctly.
All in all the variables just weren't displaying in the Global Variables tab, but they are there.
For anyone reading these let it be known that these were my faults, not the developers, yet he STILL offered me help. This is an EXCELLENT module and I will recommend it to anyone attempting to turn their EE site into a multi-language site.
You can be expecting a long time customer and again, Ben, thank you for all of your help and for designing such a wonderful module!
Ben
14 January 2009
you're welcome and thank you for the kind words
Nathan
19 January 2009
Ok so I've implemented it onto the live web site but I'm having an issue I didn't face on my dev site. The language I created is gb. When added to the index url it works fine, but when it is added to any other page it re-forwards you to the main index page. You can test it out on the site to see for yourself what it's doing. Any ideas as to what could be?
Nathan
19 January 2009
Apparently there is some code embedded in the templates:
//If the went to a non-existing category, kick them back to the index page.
if(mysql_num_rows($result_catID) == 0)
{
header('Location: http://www.mysite.com');
exit;
}
That must be removed to avoid this problem. Hope this helps somebody.
Nathan
19 January 2009
Update: That was not a complete solution as the same code is on the dev site where it works fine.
Still open for possible solutions...
Ben
19 January 2009
nathan, it sounds like an issue when removing the index.php from the url. please follow the instructions in the wiki page http://expressionengine.com/wiki/Remove_index.php_From_URLs/
Nathan
19 January 2009
That wiki explains how to remove index.php from the URL, correct? So instead of reading mysite.com/index.php/category_1 it would be mysite.com/category_1? If so, that was never performed on the dev site as all of its URLs contain index.php.
Ben
19 January 2009
can you post a link to a specific example of url's demonstrating the behaviour you described above please. i'm still not exactly sure what the problem is...
Ben
19 January 2009
can you post a link to a specific example of url's demonstrating the behaviour you described above please. i'm still not exactly sure what the problem is...
Ben
19 January 2009
it seems like an issue with your .htaccess file. since its unrelated to the multi language module, can you please email me with the contents of your .htaccess file in the gb directory and i'll take a look.
Jim Pannell
20 January 2009
Hi Ben
Is it possible to override ""user_language" => "es"" in path.php by hardcoding some php into the top of the EE template? If so, I could use this with my current multilingual site.
Cheers
Jim
Jim Pannell
20 January 2009
Feature request:
Provide a way for the english and french (for example) versions of the page to have different urls. Could this be done by hijacking the Pages module's mod_rewrite functionality in some way? This would make your module almost the ideal solution for all multilingual sites!
Why am I asking about this? Because from an SEO and usability point of view it's much more attractive to have:
domain.com/fr/a-propos-de-nous/ and domain.com/en/about-us/
rather than:
domain.com/fr/about-us/ and domain.com/en/about-us/
If you can find a way to do this I think you'd be onto a real winner ;-)
Cheers
Jim
Ben
20 January 2009
hi jim, you ccould do that with the following code:
global $IN;
$IN->global_vars['user_language'] = 'es';
make sure you set php parsing stage to input.
as for the feature request, the pages module might really be able to manage it, i'll have to check in more detail...
Tim
20 January 2009
Hello Ben,
I support the feature request from Jim, this would be a big improvement from SEO point of view.
While I'm busy posting feature requests :-) another challenge, but I guess it's a very hard one... I would be extreme useful if the entries could have different instances, one for each language. By that I mean eg a dropdown that is available in each entry that allows you to select the language instance of the entry you want to edit and that duplicates all of the fields that normally exist in a weblog. We would then be able to output those fields using the (custom) fieldname + {userlanguage} or even better and override of the {fieldname} function that read the correct language based on that variable.
I know it is a hard one, Leevi Graham is working on something similar but you might first.
best regards,
Tim.
Robin
22 January 2009
This module looks like the perfect solution! However i don't understand why base_url is needed for templates. If you copy the path.php file into a subfolder you can simple set the $site_url and all normal path links will automatically have that domain in your templates.
Ben
22 January 2009
hi robin, yes you could do it that way, but you often will want to reference the main url of the site.
for example, say you set $site_url to www.mysite.com/es/ in your path.php file and in your template you want to add a link to an image. i would normally use the form:
<img src="{site_url}images/doh.jpg" />
but this will look for the image in www.mysite.com/es/images/ when the image is in fact in www.mysite.com/images/.
that's why i think it is best to have site_url pointing to www.mysite.com/ and base_url pointing to www.mysite.com/es/
hope this answers your query
Lee
25 January 2009
I'm not sure I get what this can do. Can it help me create a multi language site where it's possible to switch the whole language of a site from say en to fr including site navigation? Is there an example site I can see please.
Thanks
Lee
Kippi
04 February 2009
Hi,
I was trying out the module and a question I had was why does it not support Norwegian.
When I try to add a new language ISO 639-1 code for Norwegian (no)
and update the bar on the top does not display "Norwegian"
Any hints, Kippi
Kippi
04 February 2009
Sorry, my question was a little premature:-)
I found where to add language phrases in the:
lang.multi_language.php
Ben
05 February 2009
hi lee, yes u can, see www.eurolanguages.com
mslater
10 February 2009
Ben,
I think this is the right tool for me but I am confused about the "phrases" . Do you have to wrap the tag {exp:multi_language:phrase... around each word that needs to be replaced? I am sorry to ask such a basic question but I am not sure how to implement the phrases in my templates. It would be completely impractical to wrap each phrase but if you have to specify the index then it would seem that you would have to.
I am not sure I "get" that aspect of it. The global variable and weblogs it seems can be done without the module.
Thanks so much
Ben
10 February 2009
mslater: you don't wrap the tag around each phrase, but you put the index of each phrase into the tag, for example:
{exp:multi_language:phrase index="who_we_are"}
you are right that the weblogs can be done without the module, however without it you would need a weblog entry for every small bit of text on your site. for example, say you have a list of properties that you want to be available on multiple pages in multiple languages:
height
width
length
weight
using the module you can easily create a multi-lingual phrase for each of the properties. i hope this clarifies it.
Lincoln
11 February 2009
Mr Ben,
Can you please explain how to go about the main site Navigation in both languages?
Plus, the LG addon updater is alerting me about an update for this module is now available, is that correct?
Thanks
Ben
11 February 2009
Lincoln: use the base_url global variable for navigating in languages, for example:
<a href="{base_url}about/">About Us</a>
the update notification was a bug, but there is now a real update that fixes this, thanks for pointing it out!
Lincoln
23 February 2009
Hi,
I've sent you a mail,have u got it?
Thanks
Ben
23 February 2009
Lincoln: yes, i did receive it. as i said in a previous comment having url_titles in multiple languages is not a feature of this module. i may look into adding it but not in the immediate future.
florian
24 February 2009
does this add-on work with categories, subcategories and entries? the phrasea are a very helpful idea and the different custom fields for the weblog are a good solution. Does this add on support categories though?
florian
25 February 2009
would love to get an answer so that I can either buy this add on or look for a different solution.
"does this add-on work with categories, subcategories and entries? the phrasea are a very helpful idea and the different custom fields for the weblog are a good solution. Does this add on support categories though? "
thanks.
Ben
26 February 2009
hi florian, at the moment it does not support categories i'm afraid. it also does not support url_titles of weblog entries. the reason is that i would actually have to change the weblog module in order to acheive this. so for the meantime it is not possible...
mslater
03 March 2009
Ben,
I have a 500 error occuring and I am pretty sure the problem is with the .htaccess file in the fr directory. I opened the htaccess you provided in the es directory and then change the language to fr for french. I i saved and ftp and when I try to view the mysite.com/fr directory i get the 500 message. If i remove the .htaccess file I can see the site in the fr directory but the links do not work. here is the .htaccess file any ideas?
I am using the exclude method and the en version is working fine should i be adding an eclude rule in this .htaccess as well?
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
Options All -Indexes
RewriteEngine on
# Remove index.php
RewriteCond $1 !^(index\.php) [NC]
RewriteRule ^(.*)$ /fr/index.php/$1 [L]
order deny,allow
deny from all
allow from all
order deny,allow
deny from all
Ben
03 March 2009
the code looks fine to me. you can email me with the domain and i'll take a look.
Ben
03 March 2009
stripping out all unnecessary code from the .htaccess file solve the problem above, so it just contains:
RewriteEngine on
# Remove index.php
RewriteCond $1 !^(index\.php) [NC]
RewriteRule ^(.*)$ /fr/index.php/$1 [L]
Robin
10 March 2009
I get the following error when trying to add "zh-cn" as a new language (i've added it to the language file).
MySQL ERROR:
Error Number: 1064
Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-cn TEXT' at line 1
Query: ALTER TABLE exp_multi_language ADD phrase_zh-cn TEXT
Gerard Keohane
11 March 2009
Hi Ben,
Is this module compatible with the Multi-Site Manager? We've have a requirement for a number of websites for a company - each website will have at least 4 languages.
How do you see this working?
Ger
Ben
11 March 2009
Robin: it looks like the minus sign in zh-cn is throwing the mysql error. can you use a different language code such as those listed here?
Gerard: yes, the module is compatible with the MSM. that means that multi lingual phrases will be available to all of your sites.
Nathan
20 March 2009
I just wanted to update you letting you know the module is working great.
It does everything I need it to do and works like a dream.
Thank you very much for such a wonderful module Ben!
Martijn
17 April 2009
Hello,
Thanks for the great module :-)
It works perfectly on my site..
One question:
I also want to use the language on my subdomain. (cpanel)
All is setup as it should be, I hope, but I get a error when I use .htaccess
Using:
RewriteEngine on
# Remove index.php
RewriteCond $1 !^(index\.php) [NC]
RewriteRule ^(.*)$ /nl/index.php/$1 [L]
http://subdomain.4elements.com
http://subdomain.4elements.com/nl/
Path is set and in the subdomain
Content path.php in the subdomain:
$template_group = "designscan";
$template = "index";
$site_url = "http://designscan.4elements.com/";
$site_index = "";
$site_404 = "";
$global_vars = array(
"base_url" => "http://designscan.4elements.com/",
"user_language" => "en"
); // This array must be associative
?>
Path set in the nl folder, located in the subdomain folder.
$template_group = "designscan";
$template = "index";
$site_url = "http://designscan.4elements.com/";
$site_index = "";
$site_404 = "";
$global_vars = array(
"base_url" => "http://designscan.4elements.com/nl/",
"user_language" => "nl"
); // This array must be associative
?>
What went wrong?
Kind regards
Martijn
Ben
18 April 2009
What error message are you getting?
Martijn
19 April 2009
When I try to access the subdomain.4elements.com/nl/about with htaccess enabled I get:
Status: 404 Page Not Found
But subdomain.4elements.com/nl/ doesn't give me an error.
(the about page is available)
martijn
19 April 2009
But what I noticed is that when i access
http://subdomain.4elements.com/about/nl/
it's not giving an error.
Ben
21 April 2009
martijn, you should have 2 htaccess files. the one in the website's root folder should contain:
RewriteCond $1 !^(nl/|index\.php) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
the one in the nl folder should contain:
RewriteCond $1 !^(index\.php) [NC]
RewriteRule ^(.*)$ /nl/index.php/$1 [L]
Martijn
26 April 2009
Ben, i Have a htaccess in my root and a htaccess in my nl folder.
But that's not the problem, my current site is handling the language like a charm.
The problem is that I made a subdomain, using cpanel this will give me an extra folder in my root folder.
Part of the site is setup to run though this subdomain, and is working as it should be.
But when i try to enable my nl language on the subdomain it won't work.
http://subdomain.4elements.com works (is the main US language)
http://subdomain.4elements.com/nl/ does not work.
I tried with htaccess but whatever i try.... no luck.... I'll get an 404, page not found....
Ben
27 April 2009
martijn, try changing the line in your htaccess file in the nl folder to:
RewriteRule ^(.*)$ http://subdomain.4elements.com/nl/index.php/$1 [L]
Martijn
27 April 2009
Hello Ben,
I tried.
But when accessing the url it adds index.php to the url:
http://subdomain.4elements.com/nl/index.php/
Works.
But when I try:
http://subdomain.4elements.com/nl/about
I get an error 404?
htaccess:
RewriteEngine On
RewriteCond $1 !^(index\.php) [NC]
RewriteRule ^(.*)$ http://subdomain.4elements.com/nl/index.php/$1 [L]
Ben
28 April 2009
did you exclude nl from the redirect in your .htaccess in your subdomain folder? you should have:
RewriteCond $1 !^(nl/|index\.php) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
Martijn
28 April 2009
Yes.
http://subdomain.4elements.com/
http://subdomain.4elements.com/nl
(by it self it changes the url to http://subdomain.4elements.com/nl/index.php/)
http://subdomain.4elements.com/nl/index.php/designscan/about/
instead of:
http://subdomain.4elements.com/nl/about/
Martijn
29 April 2009
YES!!!
It's working now.
The problem was the template group. (template group name = subdomain name)
So http://subdomain.4elements.com/about was not possible (template name within the template group)
Now I created a new template group "about" with their templates and it's working like a charm... accessing trough the subdomain :-)
Martijn
29 April 2009
So Ben,
Thank you for all your help :-)
Ben
29 April 2009
no problem, glad you got it working!
Rich
30 April 2009
Hi, is it possible to have some kind of fallback in case the translations are "not quite done yet"! e.g. if it does not find an entry in the weblog it simply says "awaiting translations" ? Im gonna look into it a bit more...
Rich
30 April 2009
Sussed it. I used this. Let me know if there is a more efficient way?
{if user_language == "en"}{news_snippet} {if:else}{news_snippet_{user_language} } {if {news_snippet_{user_language} == ''}
Sorry, this content is currently awaiting translation.
{/if} {/if}
Aljaz
04 May 2009
How should we use {title_permalink} variable on multilanguage websites for weblog linking?
Is there any rule? If not, what to use instead of it?
Ben
04 May 2009
Aljaz: {title_permalink} simply uses the "url title" as the link, so no multi-lingual functionality as far as i can tell
mslater
14 May 2009
Ben sorry i posted this on the sitemap page by mistake. I am using the multi language module with great success but client asked to switch primary language to french instead of english. I have a lot of hardcoded links with the /fr/ path. Is there anyway to simply switch the site so that it is initially in French?
Ben
14 May 2009
hi mary, you have two options:
1. open the path.php file in your site's root folder and change user_language to fr. you can also change base_url to the /fr/ path
2. put a redirect into your .htaccess that redirects visitor from the homepage to the /fr/ path
the option you choose depends on your setup and how you want to work around it.
hope that helps!
mary
14 May 2009
Thanks Ben,
I would like to do a simple redirect lest they change their minds again but essentially once i do it it always redirects the home page so it seems like i need to add in a en directory and start over again. I tried changing the base_url too but it messed up all the paths and doesnt let me get back to the english.
Alas I was looking for an easy way out and I dont think there is one.
Ben
14 May 2009
what about creating an /en/ folder for english. just copy the /fr/ folder and change all occurences of "fr" to "en". that should work...
Janus
22 May 2009
Why do I not receive the plugin?
Have sent you several messages about it and a copy of my PayPal receipt.
Ben
24 May 2009
hi janus, have sent you an email with the code
Aaron Russell
28 May 2009
Hi Ben
I have emailed you about acquiring a license for a non-profit charity project I am working on but have not had a response. I would consider paying for the module but without having a response from you I'm reticent to do so.
Please can you double check your emails sent on May 22.
Thanks
Aaron
Ben
28 May 2009
hi aaron, i've sent you a free license, thanks.
Joris
05 June 2009
In the example above for removing index.php from the url you mention the exclude method. But how would this work when using the include method (which is more SEO friendly)? Where does the language segment fit in in the rewrite condition?
Ben
05 June 2009
hi joris, if you use the include method then you don't need to add the language segment to the rewrite condition
sedev
05 June 2009
Hi Ben,
Are there any plans to make the module searchable? Ideally, with Jquery or something?
I only have 50 or so phrases but I would like to have a lot more and it is already hard to find what I need.
(By the way, it is almost impossible to read the white text on the yellow background in your entry form)
Se
Ben
07 June 2009
hi sedev, i usually use descriptive phrase indexes, for example "cats_and_dogs" and just do a word search in the browser to find what i need. i don't plan on adding jquery or other searching at the moment.
please explain what you mean by white text on yellow, i don't see that anywhere in the module.
all the best,
ben
seamus
09 June 2009
Hi Ben,
I meant the 'Leave a Comment" fields here on your webpage.
(Firefox 3 on a Mac, in case it makes a difference)
Cheers,
Se
Ben
09 June 2009
ah ok, must be specific to that browser, i'll check it out, thanks!
Kyle
25 June 2009
I have purchased the license and am playing around with it, very cool.
Question; I know there was a question already about using title_permalink and you mentioned it doesn't support that. Is there any workaround? I have weblogs that link to full entries and can't use the {path} or {base_url} variables. Please tell me there is something that works with the multi-language add on!!
Kyle
25 June 2009
As a workaround, I am using:
{base_url}templatename/{url_title}
which seems to work fine
Jon
09 November 2009
what about conditionals to check for language?
simplest example would be for the language switch links?
if fr/ show the link to the english version, if blank or en/ give the link to the french version.
thx
Jon
09 November 2009
^ nevermind, missed a few comments that covered this
Samuel Jonasson
14 December 2009
Hi,
just bought this and it is looking great. However I get this message.
Deprecated: Function eregi() is deprecated in [path to installation]...\modules\multi_language\mcp.multi_language.php on line 317
I have PHP 5.3 on my server.
Best,
Sammi
Samuel Jonasson
14 December 2009
I posted a fix on the forum thread.
Best,
Sammi
Mario Rodriguez
14 January 2010
Will this work with EE 2.0?
Thanks
Ben
14 January 2010
an upgrade for EE 2.0 is planned but no date set yet...
Jose A. Molina
15 January 2010
Hi, Ben
Congratulations for your job.
I want to ask you some question that is driving me insane:
I've been using around all the site for the navigation your syntax
{if user_language == "es"} {/if}
And it worked great, but when I try to link from inside a custom field of an entry, the link doesn't parse the variable prperly and it's shown literally.
Something like:
{base_url}/template}
Instead of:
http://www.mysite.com/template
Did you ever heard about it? I tried the change the type of the custom field ( XHTML, Auto br) and also disallow the convert urls ans emails automatically to links, but nothing happened.
Thank you and congratulations for your nice module
cj
28 January 2010
Hi does this module allow translatable 404 pages? Also can the base url of your translated site be domain based, like http://de.hello.com or http://www.hello.de or does it have to be a sub directory like http://www.hello.com/de/ ?
Ben
29 January 2010
if your 404 page is an EE template then yes it will handle it.
i haven't tested with subdomains but it should work fine, you'd just need to tweak the setup a little.
Jim In Holland
08 February 2010
Love this module - it's working a treat.
One thing for anyone wondering how links work so you maintain the same language, don't use your usual {title_permalink}.
Use a combo of {base_url} and {url_title}, so that something like:
<a href="{title_permalink='site/workshop'}">{title}</a>
becomes:
<a href="{base_url}site/workshop/{url_title}">{title}</a>
Then you stay in your preferred language!
Aaron Russell
14 February 2010
Hi Ben
I'm trying to migrate a working EE installation from an Apache setup to a Nginx setup on a different box. One of the issues I've run into is configuring the Multi Language Module.
Have you any experience with setting this up on an Nginx server, and if so can you offer any pointers?
Cheers
Aaron
Aaron Russell
14 February 2010
Just managed to answer my own question. In case anyone is interested, this is how I configured the rewrite rule on NginX:
Jim In Holland
19 February 2010
For anyone wondering how to do keep the language intact when you're paginating through, you need to extend the weblog:entries tag, and not tinker with the auto_path.
weblog:entries has a parameter where you can change the functionality of the auto_path - it's paginate_base. A typical tag would read like this:
[code]
{exp:weblog:entries weblog="weblog_name" limit="5" status="open|news|whatever" orderby="date" sort="desc" paginate_base="{if user_language != 'en'}{user_language}{/if}/weblog/template_name"}
[/code]
Now the auto_path knows to follow the paths normally laid out by the module, so auto_path works as it "cut-and-paste" should.
Big props to Ben for his support in figuring this out.
Jim In Holland
26 February 2010
I started a discussion on the EE How-To support board instead of posting little bits to this comments panel. You can find it here:
http://expressionengine.com/forums/viewthread/147304/
Guillermo
02 March 2010
Hello Ben, I'm new in Expression Engine, but I'm thinking to give it a try for a multilanguage site I have to do.
I would like to ask, what about the search using your addon ? If the current language is, lets say spanish, the search will be only throught the spanish post?
Thanks in advance,
Guillermo
Ben
03 March 2010
hi guillermo, it would be a site-wide search, not limited to just posts in spanish.
Ed
05 March 2010
Hi,
I've been using you're module on a clients site, but they've just decided to move servers and bought a load balanced set of 3 windows 2008 servers (without my consultation :/).
Is there any chance this add-on would work under windows??
:(
:: ed
Ben
08 March 2010
it'll work wherever EE works:
http://expressionengine.com/overview/requirements/
Beertje
09 March 2010
Hello,
What about permalinks? How do I remove the index.php from the permalinks?
With kind regards,
Ben
09 March 2010
if you mean in general then you simply remove index.php from your site's index page at:
CP Home › Admin › System Preferences › General Configuration
Andrew
19 March 2010
Hi Ben. Very interested in this module, but do need to find out two things:
1. Does it work with the EE Multiple Site Manager?
2. Will there be an EE 2 version one day?
Thanks in advance for any advice you can give.
Andrew
19 March 2010
Hi Ben. Sorry, I didn't see the link to show the extra comments, but when I did I found the answers to both my questions. Sorry about that!
Andrew Macpherson
21 March 2010
Hi Ben. I have added "Thai" as a language, using the ISO 639-1 code ("th"). The language is added successfully, but the word "Thai" does not appear at the top of the column. The same thing happens with Khmer ("km") and a few other Southeast Asian languages. Is there any way this can be fixed? It's just a tiny little interface glitch, I know, but it has the potential to upset my users a little -- all the European languages seem to work okay ...
Thanks in advance for any help you can give
Ben
21 March 2010
just add them to the language file (lang.multi_language.php) as follows:
"phrase_th" =>
"Thai",
Grzegorz
21 April 2010
Hi Ben,
is your Multi Language module compatitible with the EE 2.0?
i-sako
04 May 2010
I've been trying this out. For the most part it works pretty well, but I have two questions:
1.) When I search for content in languages other than the default (English), I keep getting a message indicating that "Your search did not return any results." I assume this is because the custom fields for the other languages are not being included in the search, right? Is there a way to change that? It doesn't do much good to have a site full of multilingual content if the users can only search for it in English.
2.) In some cases, there may be content that has not yet been translated, in which case I would prefer for the English content to be shown rather than nothing at all. What would be the best way to go about setting that up?
Thanks for your work on this module! Assuming I can get these two issues resolved, it will be exceedingly useful for my multilingual sites.
Ben
05 May 2010
1.) if you are using weblog entries with multiple fields for each language as suggested above then the search results should include those entries. the multi language phrases should be used for short phrase localisation rather than blocks of searchable content. the other option is to use a google searchbar on your site, much like the EE docs do (http://expressionengine.com/docs/).
2.) phrases will automatically default to english if no translation is found. for content, you can check as follows:
{if "{body_{user_language}}"}{body_{user_language}}{if:else}{body}{/if}
sedev
14 May 2010
So, any word on the EE2 version?
Your roadmap says "Planned for March 2010".
Andrew Macpherson
20 May 2010
Hi Ben
I was also checking back in to see if the EE2 version was ready yet, so it would be great to know if there's any update to the roadmap. (I'd also like to ask about Exchange Rates too, if you don't mind.)
Cheers
Andrew
Ben
20 May 2010
hi guys, its nearly ready, really. i expect to be realeasing it before the end of this month (exchange rates too).
Andrew
21 May 2010
Hi Ben. Thanks heaps. It's great to hear that things are getting closer!
Cheers
Andrew
CCB
04 June 2010
Hey there - thanks for a great plugin!
It appears to have minimal support for caching - we have caching turned on (for performance reasons) and the user_language variable appears to cache with it, without regard for the URL
Do you have any suggestions on how to handle this?
Adam
23 June 2010
I just purchased and installed the module on a 1.6x install and I'm getting a message that there is an update available. This doesn't seem correct as I just downloaded the zip. Any thoughts on why this is happening?
Ben
24 June 2010
hi nathan, i forgot to update the version number of the 1.6 module. rest assured you have the latest version.
ben
Hendrik
30 June 2010
Hi
Is it possible that snippets in EE 2 don't render the global vars of the index.php files?
Both base_url and user_language become unavailable in snippets but apperently the exp:multi_language:phrase tag does work
Hendrik
Ben
30 June 2010
yes, i believe snippets don't render index.php global variables
JEff Hoffman
09 July 2010
I ordered the language module but I can't get the .zip file to open. I keep getting errors. Can you email it to me.
Ben
19 July 2010
emailed to you and have fixed the zip file
Jeff Hoffman
20 July 2010
This language module works great in EE2. Ben also offers fast and efficient support.
» View more comments
Leave A Comment