JavaScript Edu Resources. Angular Courses. React Tutorials. Join us!


Route internationalization utility for Angular by @fulls1z3

  • translates each and property of routes, during Angular app initialization and also during runtime – when the working language gets changed.
  • You can install using

    The following packages may be used in conjunction with

    The following package(s) have no dependency for , however may provide supplementary/shorthand functionality:

    Add for in your

    In order to use properly, you should have more or less a similar route structure as follows:

    The route configuration above shows that, one of the routes contains property inside the property.

  • Then, invoke the method to fetch route translations loaded during application initialization and allow the use of by the Angular app.
  • The translations object is designed to contain route translations in every language supported by Angular application, in JSON format.
  • Pipe can be appended ONLY to a single empty string in the ‘s definition or to an entire array element:

    Example for Turkish language and link to ‘about’:

    does not work with angular-cli (yet), and giving the following error during AoT compilation:

    injects routes with the DI token using the property.


Comments are closed, but trackbacks and pingbacks are open.