Episode #3 – Completing multilingual translations of theme with DB items

At the end of the previous step, we can see than when displaying as single a post checked as french (or other language available in theme languages sub-folder), the theme terms are displayed in the same language. But not the name or description of categories or widget title.

Categories are totally depending on how the website is organized. So it necessary to import in languages files (.po and .mo) these new terms or sentences of description.

As webmaster loving keyboard or skilled with poEdit, you can do it by hand with .po files… xili-dictionary was conceived to afford pretty tools to do that on line – on the fly.

In preliminary : because the twentyten ‘root’ language is english (msgid of .pot or .po file), don’t forget to name (or rename) categories in english.

After installing, the plugin xili-dictionary, you can observe that the dictionary list is empty. To fill it with translated terms of theme (by example with fr_FR language twins), import the fr_FR.po available in the twentyten-xili folder (see previous post).

Xili-dictionary - import .po

Xili-dictionary - import .po

All the terms of theme and french translation are now in the list. And now to add the categories words, click the “import terms of categories” button and confirm.
As example, we will translate in french the category named “News”.
The list of terms in xili-dictionary is searchable. So, as shown below in screenshot, fill search with “News” to sub-select. Click Edit in column action. As visible, the term is not yet translated.

xili-dictionary - editing translation

xili-dictionary - editing translation

Click ‘add a translation’ to create a new term.

xili-dictionary - add a translated term

xili-dictionary - add a translated term

Fill the translation, don’t forget to select the target language, click add…

Repeat this with description for news… (second line)…

And now to test, we will create an updated fr_FR.mo file for the website.

xili-dictionary : exporting .mo

xili-dictionary : exporting .mo

Back to endusers side, we see that the categories list is now translated when a single in french is displayed !

Categories when single in french

Categories when single in french

At the first start of a website, this work is a little tedious. But when a modification occurs or a new category is added. It is easy.

Next step : the menus and the language list !

This entry was posted in How to and tagged , , , , , . Bookmark the permalink.

14 Responses to Episode #3 – Completing multilingual translations of theme with DB items

  1. Pingback: Episode #2 – Creation of a multilingual website with xili-language | xili-plugins for multilingual sites

  2. stéphane says:

    Hello,
    As you can see here dev.kehitys.fr/wordpress , Xili is working.

    Can you tell me how translate “Read this post in…” and widgets titles, i don’t find it.

    And half of links of sidebar are linked to french and another half in english and i think settings are good but nothing happens.

    Thanks a lot,

    Stéphane

    • admin says:

      Bonsoir Stéphane,
      Thanks for speaking english, so more people will read you !
      Do you have installed xili-dictionary ? I imagine because you comment here…
      For Widget title or other terms, you add yourself the term in xili-dictionary (as default), create the translation (as french with msgid of original term) and export .mo file of the target language…
      Some details in futher article as announced…
      Facile non !

      Michel of dev.xiligroup.com

  3. admin says:

    As since his creation two years ago, xili-language is compatible with every theme : the only condition is that this theme must be localizable with gettext features and functions like _e( or __( inside files of theme … and .pot, .po or .mo files. xili-dictionary now detects all these elements !

  4. Pingback: Episode #4 – Multilingual Nav Menus | xili-plugins for multilingual sites

  5. Alistair says:

    Hi,

    Firstly, thank you so much for this resource, it is excellent and has so far proved fairly straight-forward to implement.

    However, I have hit a snag:

    How do I add translations for the titles of the default widgets provided with WP? For instance: Categories and Recent Comments.

    I have followed your instructions and successfully added translations for categories but when I tried searching for widget titles within the xili-dictionary plugin I could not find the English entries in order to add translations.

    I would very much appreciate your help,

    Regards,

    Alistair

    • Alistair says:

      AHA!

      I just worked it out, I used the (Add term) link at the bottom left of the Multilingual Terms box and just created new terms for the widget titles that weren’t already listed, added translations and exported the .mo file.

      Sorry if this seemed obvious to you guys but it wasn’t to me so perhaps it’s worth leaving my comments here or adding them to the documentation.

      Thanks again,

      Alistair

  6. Yun says:

    Hi,

    I have a problem with this. I’ve translated to spanish and exported them to .mo and .po all my categories but when I load the page, these are still in English. Do I have to add some other code to my sidebar. I got the classic:

  7. dev xiligroup says:

    Please send to support an email using the form embedded in xili-language settings with all checkbox checked. Have you changed the title of the widgets ?
    team.xiligroup

    • Yun says:

      Thanks, I’ve alreadyt posted my problem on your forums and got a reply but honestly… doesn’t solve my problem. So, I’m re-reading all your post here.

  8. Ivy says:

    Hello,

    Thank you for those plugins, they are very useful !

    I have an issue with the menu of my website. I have pages, the translation works fine on the menu titles but the url doesn’t change.
    My computer is in English so I see the menus in English but the URL is the French one. I guess I did something wrong.
    Appearance/Menu
    I choose a page and add it to the menu
    I save the menu
    I also tried making a custom menu, but it won’t change the URL.

  9. dev xiligroup says:

    For better understanding of your particular situation, use the support email form inside the xili-language settings without forgetting to check the options !
    A reply will be done quickly !

  10. Pingback: Multilingual translations of theme with DB items « Forums of xiligroup.dev

Comments are closed.