You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
I see that this package only provides translation for locale short codes like fr or en. It is a problem when you want to translate framework messages with a locale detected as fr_FR or en_US and using the pattern method.
Why not providing those messages in folder names using the long code format ?
Anyway, I managed to get this working by adding this peace of code in my translator delegator factory:
$languageMap = array(
'fr' => array(
'fr_BE',
'fr_CA',
'fr_CH',
'fr_FR',
'fr_LU',
'fr_MC'
),
'en' => array(
'en_029',
'en_AU',
'en_BZ',
'en_CA',
'en_GB',
'en_IE',
'en_IN',
'en_JM',
'en_MY',
'en_NZ',
'en_PH',
'en_SG',
'en_TT',
'en_US',
'en_ZA',
'en_ZW',
)
);
foreach($languageMap as $shortCode => $shortCodeMap) {
foreach($shortCodeMap as $longCode) {
// Insère les traductions du framework dans le translator pour les validators et le Captcha
$i18ntrans->addTranslationFile('phpArray', Resources::getBasePath() . '/' . $shortCode . '/Zend_Validate.php', 'default', $longCode);
$i18ntrans->addTranslationFile('phpArray', Resources::getBasePath() . '/' . $shortCode . '/Zend_Captcha.php', 'default', $longCode);
}
}
The text was updated successfully, but these errors were encountered:
I see that this package only provides translation for locale short codes like
fr
oren
. It is a problem when you want to translate framework messages with a locale detected asfr_FR
oren_US
and using the pattern method.Why not providing those messages in folder names using the long code format ?
Anyway, I managed to get this working by adding this peace of code in my translator delegator factory:
The text was updated successfully, but these errors were encountered: