Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of msgctxt #279

Open
limogin opened this issue Feb 10, 2022 · 1 comment
Open

Make use of msgctxt #279

limogin opened this issue Feb 10, 2022 · 1 comment

Comments

@limogin
Copy link

limogin commented Feb 10, 2022

It is possible to make use of msgctxt context into the .po file definition? There is no clear method from native functions to get the translation of a context either. Or I haven't found.

The method Translattion::withContext ($s) { .. } / Translation:getContext ($s) { .. } would meet this?

Thanks,

@oscarotero
Copy link
Member

Not sure to understand your question. If you mean PHP native gettext extension, the context is not supported, but you can see here how it's emulated in the translator functions of this library: https://github.com/php-gettext/Translator/blob/master/src/GettextTranslator.php#L80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants