Skip to content

Support for Angular 5 i18n APIs #1133

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

Open
sis0k0 opened this issue Dec 20, 2017 · 5 comments
Open

Support for Angular 5 i18n APIs #1133

sis0k0 opened this issue Dec 20, 2017 · 5 comments

Comments

@sis0k0
Copy link
Contributor

sis0k0 commented Dec 20, 2017

Research if the new i18n tooling can replace the nativescript-intl package.

@YvesCandel
Copy link

...we need this! :)

@danieloprado
Copy link

Any updates?

@vakrilov vakrilov modified the milestones: 5.x (TBD), 6.1 (TBD) May 30, 2018
@luanReis
Copy link

We really need this! Any updates??

I followed the approach suggested by @hettiger on this issue and the solution works. However, it can cause lots of problems, as he mentioned, whenever there's an update on that. I was wondering if someone has another idea in mind.

I tried replacing the ES6 import statement by the old require like require localeFr = require('@angular/common/locales/fr'); but it only works for iOS for some reason.

@tsonevn tsonevn modified the milestones: 6.1 (TBD), next Jul 17, 2018
@vakrilov vakrilov removed this from the 6.2 (TBD) milestone Jan 8, 2019
@bsiilvia
Copy link

bsiilvia commented Feb 21, 2020

Hi guys, I found a solution to this issue.
I follow the answer from @hettiger on this issue and the approach suggested by @luanReis .

I tried maintaining the new "import" and don't change any file or position. I worked with italian but I think this will be the right solution for each language:

In my file app.module.ts I put the following code:

import { LOCALE_ID } from "@angular/core";
import  localeIt from '@angular/common/locales/it';
registerLocaleData(localeIt);

and in the same file as providers I wrote:
providers: [ { provide: LOCALE_ID, useValue: "it" } ]

Now it works perfectly. Hope this will be helpful

@justintoth
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants