What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

How to go about translations?

U052UKY482U
U052UKY482U Posts: 15 πŸ§‘πŸ»β€πŸš€ - Cadet
edited May 2023 in Help

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!

Comments

  • vasily.rodin
    vasily.rodin Freelance Software Developer. Ex-Spryker Spryker Solution Partner Posts: 21 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited May 2023

    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.

  • U052UKY482U
    U052UKY482U Posts: 15 πŸ§‘πŸ»β€πŸš€ - Cadet

    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 ?

  • vasily.rodin
    vasily.rodin Freelance Software Developer. Ex-Spryker Spryker Solution Partner Posts: 21 πŸ§‘πŸ»β€πŸš€ - Cadet

    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

  • U052UKY482U
    U052UKY482U Posts: 15 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thank you, that's sounds better!