Hi,
We’re still struggling to have system error messages (“your search did not return any results”) appear in different languages, based not on user login preference, but on a global variable carried on the site.
I wanted to know if anyone knows if there is a way I can set my site to use the language pack indicated by my global variable.. either always, or especially for users who are not logged in.
Has anyone created a multi lingual site with EE? If so, how did you handle the error messages? Does your site work only for logged in users? I know there must be a solution, but I don’t see it yet….
Thanks for any help or ideas…..
Phoebe
Moved to Development and Programming by Moderator
Hi Phoebe,
I believe the system messages will respect the Default Language specified in Admin › System Preferences › General Configuration for guests if the language pack correctly defines these. Logged in users can always change their default language.
Which language pack are you using (link?) and which version and build of EE 1.x?
Yes, the language packs will do everything you describe. Our challenge is: for NOT logged in or registers users, how can we have the language pack switch for them? An anonymous user is on the site in english, and they switch to spanish, all my content and template selection switched, but I have yet to find out how to switch a language pack. Any ideas?
Versions are 1.6.8, and 1.6.9 (dev and live are not synced yet, problem exists on both) Language packs I downloaded from EE site.. not sure which ones, but they are the standard system packs. They work great. Just can’t connect a global variable to a language pack selection. Lang Pack selection seems to require login.
Hi Phoebe,
That’s correct, the language selection is saved in the member session. This would require some development I think. You might do this by setting a cookie based upon the language chosen by the guest and then create your own global variable based upon the value of that cookie. You would need to check the cookie within an extension (maybe using the session_start or end hook). Global variables can be created like this:
global $IN;
$IN->global_vars['your_var_name'] = '';Shall I move this thread to the Development forum so you can get some community input?
Cheers
Greg
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.