Frits van Leeuwen Posted August 25 Share Posted August 25 (edited) 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 August 25 by Frits van Leeuwen (see edit history) Link to comment Share on other sites More sharing options...
Andrei H Posted August 27 Share Posted August 27 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 1 Link to comment Share on other sites More sharing options...
Frits van Leeuwen Posted August 27 Author Share Posted August 27 Thank you very much Andrei H. Do I need config.xml, maybe with config_nl.xml ? Link to comment Share on other sites More sharing options...
Andrei H Posted August 27 Share Posted August 27 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) 1 Link to comment Share on other sites More sharing options...
Frits van Leeuwen Posted August 30 Author Share Posted August 30 (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 September 2 by Frits van Leeuwen Some text was in Dutch. Sorry! (see edit history) Link to comment Share on other sites More sharing options...
Frits van Leeuwen Posted September 2 Author Share Posted September 2 After some further testing, it turned out that ModuleMymoduleAdmin.nl-NL.xlf is the correct file name format. I wrote in my previous post that I should use Module.Mymodule.Admin.nl-NL.xlf, but it turns out it has two fewer dots. Now it works perfectly for me. Link to comment Share on other sites More sharing options...
Andrei H Posted September 3 Share Posted September 3 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 1 Link to comment Share on other sites More sharing options...
Frits van Leeuwen Posted September 3 Author Share Posted September 3 You're right. I did not expect it. But that is the way. Thank you. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now