User login

How to translate a Drupal site using .po (Portable Object) files

[By Thiago Bennicchio]

Hi friends,
please read the whole email before starting the work.

Now we have offline text files to translate the interface. I'm sending Judith the Portuguese file. Mathias, Leo, please tell me in which languages are you going to translate so I can send you the proper files (please reply to all so we know who's doing what).

As we talked before, we need to be very careful when dealing with this files (not to erase commas, quotes and #).

The basic structure of the files is the following:

: modules/nonon nonno ononon

msgid "nonon nonon nonon onono"
msgstr "non nono nonononon onono"

where "msgid" is the orginial expression in english and "msgstr" is the translated version.

So you'll only change the msgstr expression (be carefull not to erase the quotes).

Hints:

1) I suggest you do this work in a plain text like Notepad ++ (http://notepad-plus.sourceforge.net/uk/site.htm). Using this software, if you select any language in "Languages" menu, you can view the lines in different coloros. "Languages" menu are for software programming, but it also makes it easy to view the .po files.

2) Don't mind translating the whole content, focus on the main expressions and menus (the ones you already saw present on the website or the ones you think is related to user interface). We've tried to clean at maximum this files, leaving only the strings that're being used on the interface, but some trash

3) some text strings brings symbols like % or ! followed by words like "name" (as !name). There's also HTML tags (like "<a href"). Those are interface variables and shouldn't be translated or changed.

any doubt, please ask here or via skype,

Thiago

[See also locale_subset]

Resolution

Comments

No solution to the actual problem

Dear Thiago Bennicchio,
You have not discussed the real problem. I have a ".POT" file. I have "poEdit" as the translation software. I open .POT file in poEdit, and save this file as ".po" file. But when I select auto translation mode, poedit does not translate my strings appearing in its window. I have done everything (I am working on it since two days) but none on the internet has discussed this problem.
Can you please help me on this issue?
You can Email me too.

Status on issue

Hey Awais, I was wondering if you solved your problem. If you did, how did you do it?

-Eric

tool

Hi Benjamin! Have you tried an online localization service? I would recommend trying poeditor.com which has a friendly interface, great for crowdsourced projects and many automation features.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.