Hello,

I work with the JOB SEARCH module and I found a Russian translation of it, which consists of a simple document.
It does not seem very difficult to make the same for french, and I would like to do so, and share it with the community afterwards .
Is there a specific way/module/software to translate drupal's modules? How do I have to do?
thanks a lot.

Comments

hsalazar’s picture

saison:

  1. Download and install the Translation Template Extractor (POTX).
  2. Use POTX to extract from the installed module a .pot template, that is, a file that includes the untranslated strings in english.
  3. Download and install POEdit, the most common string translator.
  4. Use POEdit to create, from the extracted .pot template, the French version of the strings, a file with the .po extension.
  5. Use the locale module to import the new .po file so that the module's interface appears in french.

Done!

saison’s picture

Thank you so much, it is very clear.

rmanola’s picture

Short and direct, worked fine for me, thanks!

nastov’s picture

Thank you sooooo much!
In the past, I've used different types of translation for a PHP portal, and it was always painstaking.
This is so fast and easy that I translated the entire contact module within 10 minutes =)
I just love Drupal =)

coupet’s picture

Add an entry in Documentation

----
Darly

fl3a’s picture

If you want to provide the translation of your module to the community, you should go on further with these steps, assuming module is called example and you are using 6.x.

  1. Create a translations within your the folder of your module, e.g. example/translations
  2. As a base for other translations, place the .pot file (example.pot) which you created in step 2. above within the translations folder. example/translations/example.pot
  3. Place the extracted .po from step 4. there as e.g. ru.po for a russian translation, too. example/translations/ru.po

Notes: If you use 5.x, the folder created in step 6 should be example/po.

FreddieK’s picture

Argh. I've gone through all of these steps but my module still doesn't translate when language is switched on the page. Does anyone know a resource where I can find more detailed info on how to troubleshoot this?

blainelang’s picture

As the logged in user, have you selected or set your account to use one of the new languages?
I was also having an issue like this until I set my account to use another language.

Focusing on Business Applications but heck we do anything Drupal

FreddieK’s picture

Yes, other modules translates correctly, it's just this one I'm developing that gives me a headache. It seems though that to get Drupal to import the newly added language files I need to completely uninstall the module and then install it again (which is different from just disabling it and then reenabling it). I haven't tried it yet but hope that that will solve the problem.

jaypan’s picture

Drupal will only read in translation files on initial install as you say, but you can also go to the translation interface menu and click on the import tab.

Contact me to contract me for D7 -> D10/11 migrations.

fl3a’s picture

Po-Re-Importer might be useful and another way.

esmitex’s picture

I just translated a module using poedit and uploaded it but my module is still in english.

jaypan’s picture

You will need to import the translations as well, they are not picked up automatically.

It's been a few years since I've done it though, so I can't tell you exactly how to do that. Dig around in the languages menus to see what you can find.

Contact me to contract me for D7 -> D10/11 migrations.

esmitex’s picture

I went to "Admin, languages and regional settings, import" imported the po file like 3 times already and it doesn't translate it
there are maybe 2 words out of 70 that I translated