Skip to main content
3 votes

How to get a translated string from a language other than the current one?

To find the answer to this question, you just need to look at how WordPress retrieves the translations. Ultimately it is the load_textdomain() function that does this. When we take a look at its ...
J.D.'s user avatar
  • 3,915
3 votes
Accepted

Localize plugin name

Just add the full string of the plugin name into the plugin's text domain. WordPress looks this up automatically. Same with Description, PluginURI, Author and AuthorURI. See the internal function ...
Tim's user avatar
  • 662
1 vote
Accepted

How to get a translated string from a language other than the current one?

So thanks to J.D., I finally ended up with this code: function __2($string, $textdomain, $locale){ global $l10n; if(isset($l10n[$textdomain])) $backup = $l10n[$textdomain]; load_textdomain($...
Luca Reghellin's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible