-
-
Notifications
You must be signed in to change notification settings - Fork 241
Angular 5 - manually importing locale doesnt work #1147
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
Comments
Hey guys, We have the same exact issue with this. Looking forward hearing from you guys. |
Hey @kwidzinskidawid @btaluy the support for Angular localization is logged here and our Angular developers are currently investigating the possibilities for implementing it - keep track on the issue for updates on that matter. Closing as related to #1133 |
Example workaround for de-DE until there's a official solution:
// TODO: Use following import instead and remove ./de.ts once https://github.com/angular/angular/issues/20605 is fixed
// import localeDe from "@angular/common/locales/de";
import { localeDe } from "./de";
registerLocaleData(localeDe);
Of course this workaround can be applied to any locale... Keep in mind this might cause issues whenever you update your dependencies. |
thank you! |
this is not working for me |
Since angular 5 there has been a “breaking change” to importing additional locales:
Before angular 5, just having these 2 lines was enough to use for example Date filter with custom locale:
but now as we see in docs:
https://angular.io/guide/i18n#i18n-pipes1
But if i try to do that gives an error:
This is a big issue
The text was updated successfully, but these errors were encountered: