Internationalizing a ClassicPress plugin: Localizing a string containing a parameter

ClassicPress PluginsThis post is part of the sub-series on Internationalizing a ClassicPress plugin which is part of the Internationalizing a ClassicPress plugin series.

If you have a string containing a parameter, say for example someone making a statement about the number of lights, you can combine your esc_html__ function with sprintf to switch out a placeholder with the number in a variable:

$str =...

Continue Reading Ian Grieve’s Article on their blog

Internationalizing a ClassicPress plugin: Localizing a string containing a parameter

This post is part of the sub-series on Internationalizing a ClassicPress plugin which is part of the Internationalizing a ClassicPress plugin series.

Blog Syndicated with Ian Grieve’s Permission

Author: Ian Grieve

Share This Post On
Share via
Copy link
Powered by Social Snap