sitegeist / translatelabels

TYPO3 extension to find and translate labels in frontend and admin panel
GNU General Public License v2.0
3 stars 8 forks source link

translation based on languages available in system #10

Closed kszymukowicz closed 3 years ago

kszymukowicz commented 4 years ago

hi

tnx for this nice ext! :)

I have a question. I have a case that I have 3 german languages de_CH, de_AT, de_DE and english as default.

As far as I see even if I will set "typo3Language: de" for each of de_CH, de_AT, de_DE in "config.yaml" then I need to translate this label for each de_CH, de_AT, de_DE separate?

Or you expect to use language fallbacks? Then editor needs to know that he should only edit label on de_DE and de_CH, de_AT will use this as fallback?

How do you cope with such scenarios?

bohndorf commented 4 years ago

Hi!

Sorry for the very long delay of my answer. The translation records are bound to the website language and not to the typo3Language. Currently there is no fallback mechanism implemented so you have to translate the labels for all of the de_* variants unfortunately. As you can see in the TYPO3 core in typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php in method getLanguageKeys() there is no fallback supported for labels anymore. Also the TYPOSCRIPT directive config.language_alt is not used anymore if you use site configuration in your project. Maybe I have to rethink the data structure to not bind the records to the sys_language_uid but to the typo3language. But this would be a big change.