Jump to content

Make a translation file for a module which use the new translation system and twig templates


Recommended Posts

Hi there,

I have a problem with my module, I made it using twig templates and the new translation system, but there is no way to make a translation file to distribute the tranlsation with the module.

I use Prestashop 1.7.6. I saw that we can export the translations with the version 1.7.8, but the export file is only compatible with 1.7.8 or above. I need that my translations to be compatible at least from version 1.7.6.

I tried to create a dictionary file manually as show here : https://devdocs.prestashop.com/1.7/modules/creation/module-translation/classic-system/#editing-a-dictionary-file-manually

But it does not work. I guess I made something wrong with "$sourceFile", I am not sure about how to fill this.
Should I put the whole domain, or only the file name (... it tried the two way and it did not work) ?

Anyway, it is not very clear for me if a dictionary can work with twig template or not . Does anyone has already made it ?

Many thanks for your help

Link to comment
Share on other sites

11 hours ago, tapanda.gr said:

As far as I know new translation system is compatible only for the modules made by PrestaShop SA itself. And the third party ones should follow the 1.6 guidelines for the moment. Excuse me if I am mistaken, but this is all I know.

Many thanks for your message.
If it is this case it should be more explain on the documentation, because I thought that it was recommended to use the new system for new modules 🤪. And Twig templates work only with the new translation system, isn't it ?

Link to comment
Share on other sites

4 hours ago, Virtuelle said:

Many thanks for your message.
If it is this case it should be more explain on the documentation, because I thought that it was recommended to use the new system for new modules 🤪. And Twig templates work only with the new translation system, isn't it ?

I think that yes. Personally I keep on developing on smarty (like on 1.6.x) and no problem at all till now.
Sometime in the (not so near) future, I do believe that they will change it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...