Depending on the user role, I need to show different texts in my Zend project.
- For normal users I'm using the "en" language.
- For new users I want something like "en_new".
However, the language "en_new" always reverts to just "en".
I'm using the locale_directory scan system to automatically detect languages.
The translate adapter calls
Zend_Locale::findLocale()internally inaddTranslation()(at least in ZF 1.1x). This in turn checks whether the locale is on a whitelist. Yours is not, obviously. I didn't dig too deep into the code, but it's quite probable that the next step is to revert fromen_xxxto justenwhich is what happens in your case.See the sources:
library/Zend/Translate/Adapter.php-addTranslationmethodlibrary/Zend/Locale.php-findLocalemethod