Gettext
Gettext copied to clipboard
translations findById
Hello,
First of all thanks for the work on this library, highly appreciated :)
Second, I would like to be able to find translations by their ids. Currently it is only possible to search by translations. https://github.com/php-gettext/Gettext/blob/master/src/Translations.php#L169
May I propose a PR to implement the changes? It should be fairly easy to implement.
Cheers,
Hi. In most cases the id
is generated with the context + original text (See here: https://github.com/php-gettext/Gettext/blob/master/src/Translation.php#L34)
But it's possible to use different ids so your proposal is fine. Feel free to create a PR. Thanks!
Thank you for your answer. We don't use context and the id holds the original source language in our case.
I will be submitting a PR in the next days.