Support » Plugin: Loco Translate » Loco doesn’t respect user language in backend

  • Resolved gchtr

    (@gchtr)


    Hi there

    When I use Loco in the backend, it doesn’t use the language that I set in my user preferences. So this issue is not about a plugin or theme that I try to translate through Loco, but about the Loco plugin itself.

    WordPress downloads translations from Translate WordPress automatically. So when I use de_DE as a language in the backend, the following translation files for Loco are downloaded to my site:

    wp-content/languages/plugins/loco-translate-de_DE.mo
    wp-content/languages/plugins/loco-translate-de_DE.po
    

    However, because Loco uses loco as a text domain instead of loco-translate, these translations are not loaded and the Loco plugin pages remain English.

    According to https://make.wordpress.org/meta/handbook/documentation/translations/, a plugin has to use the slug as the text domain for the plugin language packs to work.

    2. For a plugin to be imported properly and take advantage of language packs, it must have a text domain that matches its slug (e.g., a plugin with the “akismet” slug must have a text domain of “akismet”) and must not have more than one text domain.

    Can you do something about this? Or did I understand this wrong and it might be an error on my behalf? Thanks in advance!

    WordPress version: 4.7.4
    Loco version: 2.0.13

    • This topic was modified 2 years, 11 months ago by gchtr.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tim W

    (@timwhitlock)

    There is no error on your behalf. The loco-translate text domain is used for the 1.x legacy version of the plugin which is bundled with the new version for those who wish to continue using it.

    The new loco text domain was introduced for the new 2.x version of the plugin, and as such is not available yet via translate.wordpress.org.

    I’m aware of the language pack guidelines for plugins, but actually these are technical restrictions of GlotPress and not of WordPress, nor of other translation software including Loco Translate itself.

    Having said that. I plan for the next major release of Loco Translate (2.1) to remove the legacy plugin and migrate the loco-translate text domain to the new version leaving just a single text domain. Once this is done the contributors at translate.wordpress.org will be translating the new version and not the old one.

    Please note however that the loco text domain is valid and does load translations if you create and save them yourself.

    I’m marking this as resolved simply because I’m aware of the situation and have a road map for supporting the community translations project.

    Thanks a lot for the elaboration!

    So until version 2.1 arrives I guess I’ll rename the translation files to match the loco text domain.

    Plugin Author Tim W

    (@timwhitlock)

    No. The English strings are different. Don’t rename anything.

    Until there’s a community translation project your only option for v2 translations is to translate them yourself. If you open up Loco Translate’s own translations within Loco Translate itself, this should be clear.

    Alright, now I get it (loco-translate = Legacy 1.x, loco = Version 2).

    I’ll translate it myself, then. Thanks a lot for the quick support!

    Plugin Author Tim W

    (@timwhitlock)

    FYI. Current development version (2.0.14) has migrated the 2.x branch to use the correct “loco-translate” text domain instead of “loco”.

    The 1.x branch previously using “loco-translate” now uses the text domain “loco-legacy” and will be completely removed in version 2.0.15.

    So if you upgrade to 2.0.14 when it goes live you’ll have to rename any “loco-*” translation files to “loco-translate-*” in order for them to be loaded.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Loco doesn’t respect user language in backend’ is closed to new replies.