Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translation load order clarification needed #6563

Closed
ronnybremer opened this issue Sep 9, 2016 · 4 comments
Closed

translation load order clarification needed #6563

ronnybremer opened this issue Sep 9, 2016 · 4 comments

Comments

@ronnybremer
Copy link

Running a fresh CE 2.1.1 install with the Slendid de_DE language pack.

I was fighting a translation problem for a few hours until I found this (already closed) bug report:
https://github.com/magento/magento2/issues/4463

Even though it has been closed as "not a bug", I would need some clarification on this issue. Clearly, for me how it does work today and is documented in that case is not my expected behaviour.

As a theme developer I would like to override a few translations in order to make the customer experience smoother, buttons smaller, messages clearer etc.
So in my opinion, the theme translation should have the highest priority, not the module translation.

As it does work right now, the "huge" translation CSV (German has over 9000 lines in it) in app/i18n/splendid/de_DE is provided by an external source, so I would like to update it whenever those guys release a new version. If they encounter any incorrect or missing translations, they will fix it and provide an updated file. (especially important for new releases of Magento, as additional strings might need to be translated and are therefore added to this file from time to time).

My theme based translations are intended to override "inappropriate" translations for my specific use case.

If I understand the current Magento 2 translation priority correctly, I would have to perform my adoptions directly in the "huge" translation CSV. This taste completely wrong to me, as I should be able to override those translations somewhere.

Note: I know I can add additional translations for my module just fine, I am talking about overriding existing translations from the module file.

Any thoughts would be highly appreciated.

Ronny

@hostep
Copy link
Contributor

hostep commented Sep 11, 2016

I agree.

Also see this open PR which will probably fix this (I haven't tested this):
#4783

As a temporary workaround, you can create your own translation pack with your overrides which inherits from your external language pack: http://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.html#m2devgde-xlate-inheritancework

@MrDaar
Copy link

MrDaar commented Mar 18, 2017

This is also an issue for me.
The language inheritance order doesn't make sense.
I'd like to have a base translation in app/i18n, then have a company specific override in app/code/Vendor/Translations, and the the client specific translations could be in the theme in app/design/Vendor/client.
But if I put anything in app/i18n it overrides all other translations...
I would say that is broken behaviour...

base "Thank you!" (normal translation)
company "Thanks!" (informal alternative)
client "Groovy!" (anything the client thinks is cool)

@MrDaar
Copy link

MrDaar commented Mar 20, 2017

And then another issue emerges...

I can't use app/i18n because it overrides everything else, so I tried to only work with Module and theme levels.
Base translation in Module, and overrides in theme.

What happens then, is that the PHP translations respect the overrides/fallbacks/order (search box), but the JS/KO rendered elements don't (minicart).
JS/KO only uses Module translations, not theme.

So now I am forced to have a large translation in i18n...

@schmengler
Copy link
Contributor

Resolved by #7142

@schmengler schmengler removed the DOC label Mar 21, 2017
magento-engcom-team pushed a commit that referenced this issue Jan 29, 2021
[Arrows] Fixes for 2.4 (pr121) (2.4-develop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants