[wp-hackers] Translating to a different language than the one installed
lists at rotorised.com
Sat Dec 21 15:14:48 UTC 2013
David Anderson wrote:
> I'm currently working on a plugin that sends back an informational
> message to a remote (WP) site.
> The remote site's language might not be the same language as the remote
> So, it seems that I need to locally translate the string to a different
> language than the one installed.
> Alternatively, that might be the wrong solution; perhaps the translation
> should be done on the remote site, instead (so, the remote site would
> maintain a list of message codes, to be translated to strings).
If you can keep a list of all possible strings locally (that is, you
know what the other end is outputting), then ideally you'd use noop'ed
Unfortunately, we don't have noop translations for non-plural strings.
You can fake it by just using the same string twice, of course. Then,
just pass it to translate_nooped_plural() after retrieving the result.
More information about the wp-hackers