I incorporated a gettext-like localization system in my app, but my translation function looks like this:
t($category, $string, [$plural_string, $number, $vprintf_arguments])
My PoEdit keywords:
t:2
t:2,3
- t:2 tells PoEdit to parse
$string
, and it works apparently - t:2,3 should tell PoEdit to parse both
$string
and$plural_string
- but it's not :(
It only sees $string
, so I don't get the plural forms parsed... How can I fix that? I don't want to switch my function to a different argument format because I like this one :(
Also this function acts like a sprintf replacement:
- if 3rd argument ($plural_string) is a array, then the function will consider the values from the array as arguments to vsprintf
- if 3rd argument is a string and $number is provided, the function will consider $vprintf_arguments as arguments to vsprintf (if they are provided), and $plural_string as the plural form of $string
Anyway PoEdit should not interfere with non quoted arguments, right? I mean it will only parse $plural_string as string if it looks like 'abc abc'