How to escape a % in magento translation
-
05-10-2020 - |
Question
Inside Mage_Core.csv have the following line
"Please input a valid CSS-length. For example 100px or 77pt or 20em or .5ex or 50%."
The problem is, Magento expect this % to be a parameter, and gives me the error
"vsprintf(): Too few arguments"
How can i ignore this '%' ?
Solution
For a literal percent character, use %%
Reference: Magento uses vsprintf to format translations https://secure.php.net/vsprintf
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange