i18n multilingual routes - @nguniversal/builders:prerender
See original GitHub issueMy 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:
- Created 3 years ago
- Comments:5
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.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.