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

Feature(transloco): use fallback language for resolving referenced keys #742

Open
1 task done
Tlepel opened this issue Jan 23, 2024 · 0 comments
Open
1 task done

Comments

@Tlepel
Copy link

Tlepel commented Jan 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Which Transloco package(s) will this feature affect?

Transloco

Is your feature request related to a problem? Please describe

We reference translations quite often using this method: https://jsverse.github.io/transloco/docs/additional-functionality#reference-other-keys

However, when a regional language is used, those keys don't use the fallback language.

Describe the solution you'd like

I think it would be nice if the transpiler would use the fallback language for referenced keys if the current language doesn't include the key.

Describe alternatives you've considered

Alternatives I've considered are for example duplicating the necessary keys, but that's not ideal since maintenance would become very tedious.

Another alternative is rejecting the use of regions, but that's not really likely.

Additional context

Let me know if there's any pointers as to whether there are consequences I haven't thought of, since to me it seems like this shouldn't impact any current implementations.

I would like to make a pull request for this feature

Yes 🚀

@Tlepel Tlepel changed the title Feature(transloco): Feature(transloco): use fallback language for resolving referenced keys Feb 5, 2024
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

1 participant