• Resolved hdebruyne

    (@hdebruyne)


    Hi,

    This plugin is great! Does exactly what I needed.

    Now I’m trying to translate the My Account page in Dutch, but that doesn’t seem to work. I tried adding a .po file, but the text stays English. Am I doing something wrong?

    So I mean the Restricted Pages section and everything in it.

    thanks for making this plugin!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter hdebruyne

    (@hdebruyne)

    @vlado have you had a chance to look at this?

    Plugin Author Vlado Grcic

    (@vladogrcic)

    @hdebruyne Sorry for the late reply. Didnt see your message. What did you mean here:

    So I mean the Restricted Pages section and everything in it.

    Is that the Pages page where you have an overview of all your pages you can restrict?

    Thread Starter hdebruyne

    (@hdebruyne)

    Hi @vladogrcic

    What I mean is the My Account page on the frontend. There you have made a Restricted Pages section, where a logged in user can view the restricted pages and expiration. I want to be able to translate this section, since it’s all in English. But somehow the translation in the .po file has no effect. Maybe I’m doing something wrong…?

    Regards,
    Hans.

    Plugin Author Vlado Grcic

    (@vladogrcic)

    @hdebruyne I think I know what might be wrong. Did you generate .mo files? Those are needed for this to work. So try Poedit. That one should be able to create them. The exception are json files. They don’t need that. You just need to change the country code in the filename and edit it. They are for the Gutenberg editor. Alternately you could use a translation plugin to translate strings like Polylang, Loco Translate or WPML.

    Thread Starter hdebruyne

    (@hdebruyne)

    Hi @vladogrcic

    I tried both poedit (with generated .mo file) and Loco translate. But no effect. Are you sure the text isn’t hardcoded by accident?

    Plugin Author Vlado Grcic

    (@vladogrcic)

    @hdebruyne I’m 100% sure its not hardcoded. I just checked to be sure. However it might not be loading correctly. I’ll check whats wrong. Does that happen just on that page or on others as well?

    Thread Starter hdebruyne

    (@hdebruyne)

    I only tried on this page. It’s the only place I want to translate..

    Plugin Author Vlado Grcic

    (@vladogrcic)

    Could you check if there are files named page_restrict_domain-nl_NL.po and page_restrict_domain-nl_NL.mo (or maybe nl_BE if its Belgium, I don’t know) in wp-content/languages/plugins? If its there, did you set your site language to Dutch in Settings->General? I checked and translations seem to work fine.

    Thread Starter hdebruyne

    (@hdebruyne)

    No, they are here: public_html/wp-content/plugins/page-restrict-for-woocommerce/languages

    Do I need to move or copy them?

    Thread Starter hdebruyne

    (@hdebruyne)

    Hi,

    I moved them to wp-content/languages/plugins, using Loco translate. And it works!
    Don’t know why the other location didn’t work though. I’m not very familiar with the translation stuff.

    Thanks @vladogrcic !

    Plugin Author Vlado Grcic

    (@vladogrcic)

    So the files are in wp-content/languages/plugins? Your translation files shouldn’t be in the wp-content/plugins folder. It might disappear when you update the plugin. But if you used translation plugins it should work. Maybe you are using them incorrectly? Maybe try translating another plugin to check.
    Also what about this:

    If its there, did you set your site language to Dutch in Settings->General?

    Thread Starter hdebruyne

    (@hdebruyne)

    Loco translate lets you choose among several options to store the translation files.

    System: languages/plugins/page_restrict_domain-nl_NL.po
    Author: plugins/page-restrict-for-woocommerce/languages/page_restrict_domain-nl_NL.po
    Custom: languages/loco/plugins/page_restrict_domain-nl_NL.po`

    So, now I’ve choosen System and it works fine. The default is Author, which doesn’t work apparently.

    Plugin Author Vlado Grcic

    (@vladogrcic)

    Glad to hear it! The author option might work now, I added some updates to the plugin. As long as the plugin handles the author part its fine so you can choose that one if you prefer, if it works.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Translate My Account page’ is closed to new replies.