Internationalization for local variables in foreach loop
-
Hi all,
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?
Thank you
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Internationalization for local variables in foreach loop’ is closed to new replies.