• Resolved dave.ooo

    (@crossy)


    Hi there,

    I’m running into some trouble translating WooCommerce. I had a translation by default (in to Dutch) which came with WooCommerce, but I need to change some of the texts.

    I have a .mo and .po file with the translations I described above (the working default Dutch translation). However, Loco Translate doesn’t seem to recognize them. It shows the admin translations, but not the front-store files.

    I’ve tried adding a ‘new’ Dutch language, and it creates new .po and .mo files (I’ve deleted the old ones on the sever first), but then I have to translate from scratch. When I overwrite the files with the complete translations I have, they disappear again from the Loco plugin.

    The files are, to my knowledge, placed correctly:
    /wp-content/languages/plugins/woocommerce-nl_NL.po

    It does seem to recognize the admin files properly:
    /wp-content/languages/plugins/woocommerce-admin-nl_NL.po

    In short: either I have start from scratch, or I’m stuck with the default translation.

    Any way to simply edit the few lines I need to from the default translation?

    Help would be much appreciated!

    Best,
    Dave

    https://www.ads-software.com/plugins/loco-translate/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tim W

    (@timwhitlock)

    I’m not sure if I follow correctly, but WordPress will always use the bundled translation file in the plugin’s directory if it exists and won’t check the global languages directory unless that doesn’t exist. You can control this behaviour with filters in your theme if you need to make sure your copy overrides.

    Also, note that WordPress reads the MO files, not the PO files.

    Thread Starter dave.ooo

    (@crossy)

    Hi Tim,

    Thanks for your quick reply.

    My problems are in combination with WooCommerce, I haven’t tested any change in the template itself. WooCommerce seems to use 2 translation files (regular and admin), but it won’t seem to properly read/change the regular one.

    There is no translation file in the plugin or theme folder, so that doesn’t seem to be the problem.

    I’m not sure I can explain my problem better, but please ask if you arnt sure what I mean.

    Plugin Author Tim W

    (@timwhitlock)

    Perhaps this explains it –

    Loco can only manage one set of translation files per “package” (per theme, or per plugin). This restriction may be improved up on in future versions, but for now there is no easy fix.

    If this is your problem, you could work around it by creating a dummy plugin that declares the Text Domain that Loco is ignoring.

    Thread Starter dave.ooo

    (@crossy)

    Hmm, but it ‘spotting’ it in the plugin when I create a new language.

    So, technically, if I delete the admin translation, I could add the front-store one? I’ll try that now, hold on..

    Thread Starter dave.ooo

    (@crossy)

    Brilliant, that seems to work!

    Apparently the admin-translation kept being prioritized, so I simply deleted that one, reinstalled the language and got the regular translation. Replaced it with the po/mo default translation files I had, synced and voila..

    Thank you very much!

    Hello Crossy,
    can you please explain to me how you got it?

    I have already tryied all type of solutions but i cannot get my woocommerce translated with this plugin ??

    Thanks in advance

    Hi TimWhitlock,

    I’m also having trouble since I installed your plugin. Most of the WooCommerce parts like cart, checkout, products etc. are in English now. Before they’ve been in German.

    In the backend everything seems to be translated just fine, still in the frontend everything appears to be in English.

    Pleae help me out, since deactivating and deleting your plugin did not make a difference. I woud actually love to use your plugin, however it has only made me trouble so far.

    I’m looking forward to hearing from you!
    Best,
    Bernard

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Loco Translate and WooCommerce’ is closed to new replies.