Translate Formatted Strings
Posted: Sun Sep 10, 2023 2:16 am
Hi, folks.
I am new here, WordPress/ClassicPress guy that learned about Bludit six days ago. I am building a theme and I would like to know the best way to handle the translation of strings output by s/printf() functions.
Example:
Thanks
I am new here, WordPress/ClassicPress guy that learned about Bludit six days ago. I am building a theme and I would like to know the best way to handle the translation of strings output by s/printf() functions.
Example:
Code: Select all
$string = sprintf(
$L->get( 'My string with %s a function in the middle' ),
my_function()
);