question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

i18n multilingual routes - @nguniversal/builders:prerender

See original GitHub issue

My app is using multilingual routes. The route definition in the app.module.ts is looking like the following:

{ path: $localize😡@app.routes.menu:menu, component: MenuComponent, pathMatch: 'full' }

Since the ivy update this is working fine.

It would be useful to be able to prerender different routes per language. My angular.json prerender definition is looking like:

"prerender": {
          "builder": "@nguniversal/builders:prerender",
          "options": {
            "browserTarget": "app:build:production",
            "serverTarget": "app:server:production",
            "routesFile": "./routes.txt"
          }
}

It is not possible to prerender different routes per locale.

A solution would be to use the $localize:@@app.routes.menu:menu syntax in the routeFile or to add a routeFile per locale.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
muehle28commented, Nov 13, 2020

Here you find the repo. You can start the prerendering by npm run prerender:all All paths are generated, but the routenames are changing from language to language. There is no possibility to say which path belongs to which language.

0reactions
angular-automatic-lock-bot[bot]commented, Dec 17, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue i18n: Building a multi-language app with locale switcher
Vue i18n is a key process needed to localize your Vue apps and websites. Learn how to set up a Vue app with...
Read more >
Next.js i18n - How To Build a Multi-Language Website with ...
A beginners tutorial on how to build from scratch a multi-language website with Next.js i18n. Including a CodePen with the full example.
Read more >
Advanced Features: Internationalized Routing - Next.js
js has built-in support for internationalized (i18n) routing since v10.0.0 . You can provide a list of locales, the default locale, and domain-specific...
Read more >
vue-i18n route for multi language - Stack Overflow
i want to use vue-i18n with /:lang in routes ... but i want ignore default lang, for example : www.domain.com/somwhere use my default...
Read more >
I18n Tutorial: How to Go Multilingual with Hugo | Phrase
Hugo is a fast static site generator written in Go & available across multiple platforms. In this tutorial, we'll show you how to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found