How to escape a % in magento translation
-
05-10-2020 - |
質問
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 '%' ?
解決
For a literal percent character, use %%
Reference: Magento uses vsprintf to format translations https://secure.php.net/vsprintf
所属していません magento.stackexchange