Ready to get started?Download WordPress


Localization / translation of a theme (9 posts)

  1. ralph76
    Posted 8 years ago #

    Sorry, if this has already been asked (but not found during my search), but i'm stuck with translating and localizing a theme for WordPress.

    I already use the german PO-file, so the backend is in german, but not the theme i want to use. The author of the theme told me the strings are already marked up correctly. So what can i do now? As far as i got it, i can extract those strings from the theme and create a PO-file with the strings translations. Is that right so far? But what to do after that?

    Is it even possible to use two different PO-files at the same time (one for the backend and one for the theme)?

    Hopefully, someone can help me along...

  2. moshu
    Posted 8 years ago #

    First of all I am surprized the translation works with the .po file. Normally you should use the .mo file; see:

    If the theme is marked for localization (see the localization technology then using poEdit you can create a POT file for the theme and a .po file from which poEdit can generate the .mo file.

    About localazing themes (and plugins) there is a short guide on Ryan's blog:

    There is also a German support site http://wordpress.de/
    and if you need more specific help you can subscribe to the polyglott mailing list http://lists.automattic.com/mailman/listinfo/wp-polyglots
    that brings together translators of WP.

  3. ralph76
    Posted 8 years ago #

    Thank you for the info. You are right, i use the .mo-file.

    The only "missing link" that i have now is how to get / create a POT-file for the theme. How can i do that with poEdit?

  4. moshu
    Posted 8 years ago #

    I apologize for the incorrect info in my previous post.
    It seems poEdit doesn't create POT file - sorry, I've used it a long time ago.
    The only thing I found is this message on the wp-hackers mailing list:

  5. ralph76
    Posted 8 years ago #

    Never mind because of the wrong info - you already helped me a lot.

    Now one more question before i start using POT, po and mo: From what i've seen in the POT-file, the location of the the to be translated string is defined with row. But if i change / edit / manipulate the theme somehow, this rows are probably wrong afterwards - what will happen then?

  6. moshu
    Posted 8 years ago #

    Don't quote me on this... :)
    But I think the line numbers are there just to be able to check the original for context, if it's necessary.

  7. ralph76
    Posted 8 years ago #

    So it shouldn't matter, when they are "out of sync"?

  8. moshu
    Posted 8 years ago #

    Well, see this for yourself:

  9. ralph76
    Posted 8 years ago #

    I read this chapter, but i don't fully understand the "context" part...

Topic Closed

This topic has been closed to new replies.

About this Topic