https://www.spryker.com logo
Title
c

cool-dawn-43386

05/25/2023, 6:12 AM
Hello, cause I didn't have any answer to my message 2 days ago, i post it again in case of it wasn't seen: Hello everyone, I'm working on translations in my Spryker app, and I'm a bit doubtful about how to do it. For Yves, it's pretty obvious, the data/import/common/common/glossary.csv file does the job well with a pretty logical key/value/locale strategy. For Zed, we go into another world, the texts are hardcoded and we find a csv file per locale in the Translator module with a hardCodedValue/translatedValue strategy ? It seems rather strange to me that we are dealing with two different worlds. Especially since in Zed, not only menu entries are hardcoded, but also all table headers, button labels and so on. Did I miss something or do I really have to check each menu page to have something presentable in my locale as a demo? (and with the browser inspector because it's case sensitive for what is capitalized...) Especially since this is a huge job that will undoubtedly be destroyed as the customer's UI/UX is integrated. Thanks in advance for your answers!
b

brave-article-83943

05/25/2023, 7:54 AM
Hi Fabrice! Regarding difference between Zed and Yves: you're right, that happened because of historical reasons. Yves had translations implemented with glossary.csv since the beginning, but Zed UI was for a long time only available in english, that's why the approach is different. But I think you don't have to go through each menu page with the browser inspector. Already existing translation files provide a good set of keys, so if you want to introduce a new language in UI, just start with the keys you already have for english / german, it should cover 99% of cases, including headers, buttons and basic UI elements.
👍 1
c

cool-dawn-43386

05/25/2023, 8:02 AM
Thank you for your answer, but in default files from Translator module only few keys are existing. Other keys seems to be reparted into concerned modules, and if i want to properly manage these translations, I need to extend each of these modules? For example, translations for Merchant Gui isn't in Translator module, but in Merchant Gui Module under data/translation/Zed. Am I right ?
b

brave-article-83943

05/25/2023, 8:07 AM
Right, each module delivers their own translations. So this file: https://github.com/spryker/merchant-gui/blob/master/data/translation/Zed/de_DE.csv represents all the keys, which are used inside of Merchant Gui module. Maybe some keys are even repeated between different modules. But on the project you don't really have to split them into different files, you can merge them all to one csv and manage it from one place to make it convenient
👍 1
c

cool-dawn-43386

05/25/2023, 8:12 AM
Thank you, that's sounds better!
🙌 1