Comments (5)
Hi,
Please try removing the L10nRoutingModule
from the app. If without the module the problem doesn't arise, I'd need a reproduction to figure out what's going on.
from angular-l10n.
Hi,
Please try removing the
L10nRoutingModule
from the app. If without the module the problem doesn't arise, I'd need a reproduction to figure out what's going on.
Hello @robisim74 ,
thanks for your response.
Correct, removing L10nRoutingModule from the app resolves this issue completely. Sadly, changing the language doesn't work then either.
I'll see, what I can do to provide a working example, since this is restricted code.
Thx.
from angular-l10n.
Hello @robisim74 ,
I sent you a message thru LinkedIn - asking, how to provide you with the sample code. I cannot upload it here, since it's internal knowledge.
Thanks.
from angular-l10n.
Hi @stefan-schilling ,
to post formatted code here, please select the code, and then press <>
(Add code). I edited your original post.
I explain how L10nRoutingModule
works:
- L10nRoutingService detects when a navigation starts, and remove the language from the path
- Redirects to the path without language
- When a navigation ends, replaces url with language (no reload)
So you should check:
-
If there is any error in console when you press F5 (I see an
errorRoute
in your routing: what does it do?) -
Debug
redirectToPath
: https://github.com/robisim74/angular-l10n/blob/master/projects/angular-l10n/src/lib/services/l10n-routing.service.ts#L67-L74: is it redirecting you to a path that exists in your routing?
-
If there is any problem in the path, you can fix it by implementing
L10nLocation
class-interface? See https://github.com/robisim74/angular-l10n#routing
If you can't find the problem this way, a repro is needed. But I don't need the whole app, it should be enough to recreate the problem:
- The configuration for this library
- The routing with
errorRoute
and the affected sub-routes
You can use empty components, I don't think they are interesting for this problem.
If you can recreate the problem with these items, you can upload to a github project, or use stackblitz.
Otherwise post the relevant code here (configuration and routing, again, components are not needed) and I'll try to recreate the problem myself.
Thanks!
from angular-l10n.
In the latest v.16, L10RoutingModule
has been removed. A new, more stable way of creating localized routing is recommended: https://github.com/robisim74/angular-l10n#localized-routing
You can get it in older versions too, by using L10nUserLanguage
instead of L10nLocaleResolver
.
Greetings
from angular-l10n.
Related Issues (20)
- Number format options HOT 7
- Release a version with peerDependencies compatible with RxJS v7 HOT 3
- split big files HOT 2
- Namespace 'Intl' has no exported member 'RelativeTimeFormatOptions' HOT 3
- [Question] Differences / Benefits vs ngx-translate? HOT 3
- Setting available languages from Database HOT 5
- Problems after Upgrading HOT 2
- locale.language is empty, Error: angular-l10n (L10nDefaultTranslationLoader): Asset not found HOT 2
- Incorrect date format HOT 2
- Namespace 'Intl' has no exported member 'ListFormatOptions' HOT 1
- possibility to configure PARSE_DATE_STYLE const. Configure full, long,medium,short options HOT 2
- Opening subpages in tabs works - sometimes HOT 1
- I encountered this problem: Unexpected value 'TranslateModule' imported by the module 'SharedModule'. Please add an @NgModule annotation. HOT 2
- angular-l10n used in angular component being imported from react parent application as library doesnot work HOT 8
- Is it possible to use angular-l10n to support custom translations in library1 while the config for translations stays in the main app that uses library1? HOT 10
- Json file convertion to js chunk creates a sublevel: [lang]_default HOT 2
- Allow for template elements inside of params HOT 4
- Will there be an Angular 18 release? HOT 2
- Removal of L10nLocation Interface and L10nRoutingModule HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-l10n.