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

Multi-language support for hyperlinks in i18n #29903

Open
AsrarMemon opened this Issue Apr 15, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@AsrarMemon
Copy link

AsrarMemon commented Apr 15, 2019

Hello,
We are developing a progressive app web using Angular 7.
The application must support multiple languages (around 18). For providing multi-language support, we are using Angular's Internationalization (i18n) tools.

There are few hyperlinks in our application which should open different links based on the language selected.
For example:
Link for FR language:
<a class="nav-link" href="https://www.essilor.com/fr/"> ACCOUNT </a>

Link for EN language:
<a class="nav-link" href="https://www.essilor.com/en/"> ACCOUNT </a>

How can we avoid writing 18 different links for each and every language that we support. Does i18n provide any mechanism for the same?

Waiting for an urgent help here...

Thanks

@dawidgarus

This comment has been minimized.

Copy link

dawidgarus commented Apr 15, 2019

Inject LOCALE_ID to your component and you can use it as variable in template.

@ngbot ngbot bot added this to the needsTriage milestone Apr 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.