php-i18n icon indicating copy to clipboard operation
php-i18n copied to clipboard

How to make translations with parameters work?

Open ppazos opened this issue 5 years ago • 1 comments

In the doc, there is this example:

echo L::last_modified("today");

That seems to output a text with the "today" replaced using some kind of variable name, but in the sample lang files, an example for that is missing.

What's the format of the lang files to support parameters?

ppazos avatar Dec 27 '19 04:12 ppazos

The string is formatted with PHP's vsprintf. I am happy to accept a pull request to add the missing example string.

Philipp15b avatar Jan 22 '20 16:01 Philipp15b