[Translator] Parent locales are not implemented (yet)
I guess the ux-translator should behave like symfony. I notices that fallback-locales are not implemented yet:
see https://symfony.com/doc/current/translation.html#fallback-translation-locales
Strictly speaking, fallback locales are implemented: https://github.com/symfony/ux/blob/03a85b5301c675076121b9e4664d0b29f3750d03/src/Translator/src/TranslationsDumper.php#L177
But I imagine you are refering to the parent locale system ? (en_GB -> en)
I don't think this is something implemented right now (@maelanleborgne correct me if i'm wrong)
Would you like to work on this feature @mkrauser ?
Hi, maybe I did things wrong when implementing them, but they should be there:
- https://github.com/symfony/ux/blob/2.x/src/Translator/assets/src/translator.ts#L135C11-L162
- tests: https://github.com/symfony/ux/blob/2.x/src/Translator/assets/test/translator.test.ts#L412-L463
WDYM when saying "I notices that fallback-locales are not implemented yet", do you have some code to share with us?
Hey,
we are using german ("de") as our main (and fallback) language and some message are "translated" to austria "de_AT". In PHP the fallback from "de_AT" to "de" works. In the ux-translator not. So I guess it is like @smnandre suspected:
But I imagine you are refering to the parent locale system ? (en_GB -> en)
I did not check the ux-code, I just suspected it was not implemented yet. Sorry for the confusion.
Would you like to work on this feature @mkrauser ?
Yes, I would love to do that. But I'll be on vacation soon so it'll take a couple of weeks
Thank you for this suggestion. There has not been a lot of activity here for a while. Would you still like to see this feature? Every feature is developed by the community. Perhaps someone would like to try? You can read how to contribute to get started.
Friendly reminder that this issue exists. If I don't hear anything I'll close this.
Hey,
I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!
Thank you for this suggestion. There has not been a lot of activity here for a while. Would you still like to see this feature? Every feature is developed by the community. Perhaps someone would like to try? You can read how to contribute to get started.
Could I get an answer? If I do not hear anything I will assume this issue is resolved or abandoned. Please get back to me <3
@carsonbot I'll take a look at this