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

Reuse the core translator is possible to generate translations #2

Open
Quetzacoalt91 opened this issue Jan 7, 2020 · 0 comments
Open

Comments

@Quetzacoalt91
Copy link
Contributor

Quetzacoalt91 commented Jan 7, 2020

Originally posted by @zalexki in #1 (comment)

I'll add that the current way using regex might not be the easiest/safest.
I would try to simply boot the module and get all the translations needed with the prestashop built-in translation system that must be aware of all needed translations.

Plus i think it's @matks that told me about some kind of already built-in translation system in prestashop capable of generating needed translation keys for a module/theme (or something like that).
So now that we have a translation module working, i think it's important that the next step is to get informations about what exists and how we can use it for our needs.


Answer from @matks

So, I know that:

prestashop can translate native modules using one system A
prestashop can translate 3rd party modules (such as this one) using one system B

And system A and system B are not the same (dont asky me why roll_eyes).

Also, we have enabled a system C that uses Symfony translator to be able to translate Symfony modules, and legacy modules (= modules not using Symfony) can use it too ! This one is fully documented here: https://devdocs.prestashop.com/1.7/modules/creation/module-translation/new-system/ and is backward compatible: if a module was using system B and is switching to system C, translations already created for system B can be used by system C.

However this system C is available since PS 1.7.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant