[Resolved] Internationalization for local variables in foreach loop
Currently I’m internationalization plugins and themes to ensure all text displayed is translated according to the correct language.
I’ve come across a function that prints out descriptions in a foreach loop. From the codex and online material, for dynamic text or variables, I’m supposed to wrap the __() in a printf() or sprintf().
However, if applied to a foreach loop, the msgid string in .po file will be the same for all description which is “This is my text %s”.
How do I go about achieving internationalization in a foreach loop?
- The topic ‘[Resolved] Internationalization for local variables in foreach loop’ is closed to new replies.