• Resolved acn

    (@acseven)


    Hi,

    Is there a way of handling multilingual strings within a snippet?

    I.e. using:

    $my_text = __('Here's my Text!','snippet1-text-domain');

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    This does work, as long as you loading a PO file for snippet1-text-domain textdomain, and you are calling the __() function after the translation file has loaded.

    Thread Starter acn

    (@acseven)

    Thanks for the reply. I actually looked just now into String Translation (WPML) and the strings were automatically detected, so that was a lot easier.

    But thank you anyway!

    Plugin Author Shea Bunge

    (@bungeshea)

    Glad to hear that you found a good solution.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Translated Strings within Code Snippet’ is closed to new replies.