Fix missing translations in TYPO3 and Snowbabel
For some years the language codes TYPO3 used for translations where based on the ISO country codes - not the ISO language codes! That was changed with TYPO3 4.6. That's why it might happen that translations go missing on the website if you do not move the language files correctly after updating from TYPO3 4.5.
This issue gets even more confusing if you use snowbabel. For some time they also used the faulty language codes from TYPO3 4.5, but then switched to the new labels in version 3.6.2. There you can also lose your translations if you don't take the proper actions.
Affected languages
There are quite a few languages that were affected by the language code switch. As a rule of thumb these are languages that have a country code other than the language code for the main spoken language there.
If you don't use any of those languages in your projects, you might stop reading right here, because you won't have to change anything.
Here is a conclusive list of all affected language codes
Bosnian:
ba
->bs
Brazilian Portugese:
br
->pt_BR
Chinese (Traditional):
hk
->zh
Czech:
cz
->cs
Danish:
dk
->da
French (Canada):
qc
->fr_CA
Galician:
ga
->gl
Georgian:
ge
->ka
Greek:
gr
->el
Greenlandic:
gl
->kl
Japanese:
jp
->ja
Korean:
kr
->ko
Malay:
my
->ms
Slovenian:
si
->sl
Swedish:
se
->sv
Ukraine:
ua
->uk
Vietnamese:
vn
->vi
All the language codes comply to ISO 639-1 with one notable exception: Simplified Chinese (that would also be zh
like Traditional Chinese) maps to ch
.
1. Change config.language
Change the TypoScript for your configured languages to the new language codes like so
There are lists of all supported language keys in t3lib_l10n_locales and Core\Localization\Locales respectively. And you could even add your own.
2. Move translation files in typo3conf/l10n
Now you have to move some files in the typo3conf/l10n folder. This script does that for you:
3. Update Snowbabel
When using snowbabel, you should update to at least Version 3.6.3. If you want to use Traditional and Simplified Chinese at the same time you should also apply this bugfix.
The update is necessary so that snowbabel uses the new language codes.
4. Run scheduler on snowbabel
Snowbabel comes with a scheduler task called Snowbabel - Indexing. Run that now to crawl the new files and remove the old translations.
5. Fix access to languages in snowbabel
In case editors have access to snowbabel, you might need to grant them rights to the modified language keys again in be_groups. See the field "Translation - Languages" for that.
No Comments yet
Respond to this post