Jump to content

Recommended Posts

Hello,

When I read the names and descriptions of the modules in the module manager, they are multilingual. So when I change my backoffice to Dutch, The names and descriptions are in Dutch. Even so, when I change to English, the modules have English names and descriptions.
But not mine. Yes, I know, I can translate in Prestashop, but that's not what I want. I like to bring my translation in the module. 

So after install of the module, I see the module in the module manager, but not in the chosen language.

Who can tell me how to fix this?

Thanks for help.

Frits van Leeuwen

Edited by Frits van Leeuwen (see edit history)
Link to comment
Share on other sites

Hello,

You do need to actually translate the module.

Translating the module will create a translations directory inside it, which you can ship along with the module.

Here are some useful links: new translation system and classic translation system

You might also need to clear the cache once you added the translations as some of them (if I remember correctly, the description, at least) are getting cached

  • Thanks 1
Link to comment
Share on other sites

Hello,

As far as I'm aware, that's not needed.

The texts in the __construct method (name, description, uninstall text etc.) will also be added in the translations directory under the specific language file, as long as you are wrapping them with a translation method ($this->l or $this->trans)

  • Thanks 1
Link to comment
Share on other sites

Posted (edited)

Ok, I've tested a lot with different ways to build the translations.

I only use the .xlf files. But how to build them and where to place them. 
In the manual I read /translations/nl-NL/Module.Mymodule.admin.nl-NL.xlf

I installed my module and went to International - Translate.
Then I exported the translation and downloaded the file ModuleMymoduleAdmin.nl-NL.xlf.
I had to copy its contents to Module.Mymodule.Admin.nl-NL.xlf . However, this file must be located in /translations/ and not in /translations/nl-NL/

After each action, I cleared the cache, either via PrestaShop or FTP.

This seemed to work fine. However, I still have the problem that the module manager doesn't change the language of my module when I change the language of the back-office.
So I'm still looking for a solution for that.

Edited by Frits van Leeuwen
Some text was in Dutch. Sorry! (see edit history)
Link to comment
Share on other sites

Hello,

You don't really need to create the files manually.

The easiest way is to go to Admin -> International -> Translations. Under the Export a language section, select Installed module translations, then select your module and the language and click Export

  • Thanks 1
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...