Skip to content
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

Can't get this to work #9

Open
JuergenSimon opened this issue Nov 16, 2017 · 2 comments
Open

Can't get this to work #9

JuergenSimon opened this issue Nov 16, 2017 · 2 comments

Comments

@JuergenSimon
Copy link

Hi,

I'm trying to make this work in a Nativescript/Angular application (with Typescript). I have a setup with an application module, a child module (tab module), built from the tab-component template that comes with Nativescript. I'm not sure how to add this to my @NgModule declaration? Do I need to add it to the application module or the tab module? Or both? Where do I put the code that you have in this block:

nativeScriptBootstrap(TestComponent, [
  HTTP_PROVIDERS,
  provide(TranslateLoader, {
    useFactory: () => {
      // pass in the path to your locale files
      return new TNSTranslateLoader('assets/i18n');
    }
  }),
  TranslateService
]);

?

PS: I also tried plain ng2-translate but the |translate pipe never worked for me. Perhaps because it couldn't load the translation files?

@JuergenSimon
Copy link
Author

@gustavost26
Copy link

Eu criei um projeto de exemplo: https://github.com/JuergenSimon/translation-test

This link is broken.

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

No branches or pull requests

2 participants