-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Feature(config): support translation without needing to specify availableLangs #653
Comments
I'm in the same boat here, it makes it painful when adding a tool like Weblate or Crowdin and not hardcoding a ton of different languages. I think passing undefined or omitting should allow for any locale to be used. I went the hardcoding route but still require maintenance as Weblate has a ton of language codes:
|
Currently the available languages need to be set, otherwise the translated values won't be returned. With this change the translation will also work when omitting the availableLangs config, or setting it to null. ✅ Closes: jsverse#653
Currently the available languages need to be set, otherwise the translated values won't be returned. With this change, the translation will also work when omitting the availableLangs config, or setting it to null. ✅ Closes: jsverse#653
I see your point/pain. |
any news about this ? |
Is there an existing issue for this?
Which Transloco package(s) will this feature affect?
Transloco
Is your feature request related to a problem? Please describe
In our company, we have a third party tool where the translations are maintained. The developers add the keys in the english language and upload the keys to the tool. Someone else will take care that the keys will be translated in all supported languages. During build, we download all the translation files. However, the developers don't care which languages are supported, either the translation file is there, or it's missing and we run the fallback logic. Transloco though forces us developers to maintain a list of all supported languages, which is annoying for us as it's not our responsibility. Adding new languages now requires code changes, which complicates this process unnecessarily.
Describe the solution you'd like
In
TranslocoConfig
, when omittingavailableLangs
, or setting it tonull
, I can load any language without restrictions.Describe alternatives you've considered
We can bite the bullet and maintain the list of supported languages
Additional context
We are migrating from ngx-translate, there we don't need to specify the available languages.
I would like to make a pull request for this feature
Yes 🚀
The text was updated successfully, but these errors were encountered: