• Resolved benarab91

    (@benarab91)


    Hello

    I’m using WPML to translate my WooCommerce site. My site is in English and French. If you are not logged in the menu displays a “login” button, and if you are logged in, it switches to a “My Account” button. I made this function in the theme code, and so I have used __(‘login’) and __(‘My Account’) in order to make it translatable. Both of them show up in translation strings and I’ve translated both of them, but for some reason the “My Account” button does not switch to the French translation when the site is in French. The Login button works perfectly, but I just can’t make the My Account button translate. Can anyone help me?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    Thank you for reaching out!

    If you’re just using __('My Account'), then you’re using the default context and I know that “My Account” is a string that is present in the woocommerce context as well.

    Possibly you translated the wrong (or only one of many) string in WPML -> String Translation.

    Unfortunately, we won’t be able to help you get to the bottom of this here, but if you have an active subscription, I suggest opening a ticket in our forums where a Support Team Member will be able to take a closer look at your setup and suggest a resolution.

    https://wpml.org/forums/forum/english-support/

    Best,
    Izzi

    Thread Starter benarab91

    (@benarab91)

    I don’t think it has anything to do with the string being present in the woocommerce context. The reason for that is that I’ve tried to put my own name and translated it just to test, and it still doesn’t translate..

    Hi,

    But you said __('login') works fine. So, we have two unique strings that are not translating (your name and “My Account”), while one is translating fine (“login”).

    So, I feel that at least, this is not a bug ??

    Without being able to see your template code, what other plugins you are using, etc., it’s not really possible to debug this and we don’t ask for that kind of information / code in this public forum.

    Could you please open a ticket here so we can assist you further?
    https://wpml.org/forums/forum/english-support/

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why does my string not get translated?’ is closed to new replies.