Closed simensol closed 2 years ago
Hi @simensol, I'm not sure I understand. The $gettext
function is for common/"global" translations and $pgettext
is made specifically to work with a message context to be able to translate the same message differently depending on where in your application it is used. So if you need a context, you just use $pgettext
instead of $gettext
(the function names and signatures are inspired by the GNU gettext utilities).
I thought $gettext
wasn't able to interpolate, and that I had to use $pgettext
for interpolation. My wrong!
Why isn't
context
available in$gettext
, while it's available as the first argument of$pgettext
?