On 22 Apr 2008, at 16:28, [EMAIL PROTECTED] wrote:

> A few things that may cause a change in beforeFilter not to work is
> that you have to set it to eng, fra or swe... not en_us, se_sv or
> something similar (just checking). You should try this with all
> caching off for a start (see above). Also remember, you have to set it
> before using i18n.

I'm setting it to "jpn", the default was "eng".
What's the correct one to use anyway? I've seen different codes used  
throughout the i18n/l10n modules. Sometimes it seems to use 'ja',  
sometimes 'jpn'. It's pretty confusing/inconsistent.

> The main problem with changing the language is that i18n loads the
> locale once and looking at the code now I am not sure there is a
> simple way to change it once it has been loaded. You would have to
> make i18n drop its current instance and create a new one. There is no
> public method for doing this.

Okay, that fixed the problem. There was a call to __() in my  
beforeFilter before the language was switched.
Sorry, my fault then.

Another question though: the manual states that:
> Any Controller that uses localized content should include the use of  
> the L10n CakePHP utility class.
> uses('L10n');

This doesn't seem to be necessary. Additionally, isn't var $uses =  
array('L10n') the preferred method?

Chrs,
Dav

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to