-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Ability to manually specify locale in SSR #29019
Comments
It is not recommended to display application content based on the However, an alternative feature could be implemented for cases where internationalization (i18n) is enabled. In this scenario, users can be redirected to their preferred language locale if no specific locale is included in the URL. For example:
|
This is relevant if the content is different in different locales. This is even stated in the link you provided:
For example, I see different locales when I go to https://docs.google.com/, https://www.youtube.com/, https://translate.google.com/, etc. Even the link you provided opened in the locale that I use. For example, in blogs, a link with a locale is quite relevant. But in admin panels, online stores, etc., this greatly interferes with users, because if they open a link from outside, we will show the UI not in the locale that is relevant for the user, but in the locale of the user who provided the link. |
This seems to be a rather specific use case, as Angular's build-time i18n generates separate files/routes for each locale, and these files are always located in different directories (including for client-side routing). This setup may not align well with your goal. Your use case might be better suited for runtime translations, where there are no separate resources nor route for each locale. |
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list. You can find more details about the feature request process in our documentation. |
Description
There is no way to specify locale in
AngularAppEngine#handle
based onAccept-Language
,Cookie
, etc. The current implementation ofAngularAppEngine
chooses locale based on URL.Describe the solution you'd like
Ability to specify an array of locales when calling
handle
:As far as I understand, this will also require removing the locale prefix from
<base href="…"/>
.Describe alternatives you've considered
No response
The text was updated successfully, but these errors were encountered: