WordPress.org

Ready to get started?Download WordPress

Forums

Translating a theme (twentyten) (13 posts)

  1. Tilex
    Member
    Posted 3 years ago #

    Hi,

    I've got a WordPress blog up and running, and it has twentyten as the theme installed.

    Twentyten comes with a language folder and a po file in it.

    I'd like to be able to translate the strings into French (and keep the English). How do I go about doing that ?

    The filename is twentyten.po. Since the "text domain" is twentyten, I tried copying it to wp-includes/languages/twentyten-fr_FR.po, translated a few strings, and compiled the .mo file using the "msgfmt -o" command, but when I reload the page, the strings are not translated.

    And also my wp-config.php file is set correctly for French.

    What am I doing wrong ?

  2. Tara
    Member
    Posted 3 years ago #

  3. Tilex
    Member
    Posted 3 years ago #

    Hi t-p. Thanks for your input.

    As I mentionned, "And also my wp-config.php file is set correctly for French." My website is in French, which is fine. But I want to translate Twentyten's language file.

    Thanks

  4. Tara
    Member
    Posted 3 years ago #

    see if you can use any of the plugins.

  5. Tilex
    Member
    Posted 3 years ago #

    Hi t-p.

    I don't think you get my question.

    I don't want to use a multilangual plugin, I know them. I have a twentyten.pot file with strings to translate. I just want to know what to do with it once I've translated the strings.

    Thanks

  6. nbtetreault
    Member
    Posted 3 years ago #

    Je crois que tu dois créer un dossier "languages" dans ton thème et l'appeler fr_FR.mo.

  7. sugupal
    Member
    Posted 3 years ago #

    Did you ever found the solution for this?
    I am trying to do the same thing and would appreciate any help :)

    Thanks

  8. fonglh
    Member
    Posted 3 years ago #

    the name of the .mo file must match the country and language expected.

  9. Tilex
    Member
    Posted 3 years ago #

    Hi sugupal,

    You can download WordPress in your language :
    http://codex.wordpress.org/WordPress_in_Your_Language

    and copy/paste the "languages" folder of wp-content/themes/twentyten into the installation you are working on.

    For my problem, I found the file fr_FR.mo and copied it to my theme languages directory.

    Alex

  10. sugupal
    Member
    Posted 3 years ago #

    Thanks for you help!
    I did what you told me and even though some of the messages were translated, some other are still in english like:
    This entry was posted in Uncategorized. Bookmark the permalink. Modifier
    Do you know how to translate everything?

    Thanks again,
    Susana :)

  11. Tilex
    Member
    Posted 3 years ago #

    Well first, make sure Susana that you have the latest WordPress translated in your language.

    If there are still messages not translated, I would suggest (but am not sure of) to open the .po language file (fr_FR.po) with a good text editor (like Gedit or Kate on Linux, TextMate on Mac or JEdit on Windows) and following the logic of the file, go modify/add a message entry.

    Hope that helps.

    Alex

  12. fonglh
    Member
    Posted 3 years ago #

    it takes a bit more work than that. I wrote a blog post about my own experience at http://wpadventures.wordpress.com/2011/04/08/i18n/

    You can follow the links at the bottom of the post to the tutorials I used, I found them from the codex actually.

  13. ringolingo
    Member
    Posted 2 years ago #

    I had this problem with my Spanish-language blog. After I upload the .mo file in wp-content/languages, some strings were still in English. And then I realized that the Twenty Ten Theme needs its own translation .mo file in its own language folder. I found the translation and just uploaded it. Check here: here. In French I have found this. In Spanish you would name the file es_ES, and in French fr_FR.

Topic Closed

This topic has been closed to new replies.

About this Topic