angular-ngrx-material-starter icon indicating copy to clipboard operation
angular-ngrx-material-starter copied to clipboard

How do i18n json files get read for a custom renamed examples component

Open peterclemenko opened this issue 4 years ago • 3 comments

So I'm trying to create a new component based on examples called "workspace". In workspace.module (renamed from examples) I added workspace instead of examples as the path, and copy pasted the folder as workspace. When I try to use the new tabs though, the tabs show as the i18n names rather than the translated/proper captions. There has to be something I'm missing. Any suggestions?

export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader( http, ${environment.i18nPrefix}/assets/i18n/workspace/, '.json' ); }

peterclemenko avatar Sep 12 '19 01:09 peterclemenko

Pfuu, hard to say like this, must be something missing, wish you good luck with the hunt!

tomastrajan avatar Sep 12 '19 07:09 tomastrajan

I don't know why it's broken on the sub localization files, but moving the localization to the main localization did the trick. Not sure if I should close this.

peterclemenko avatar Sep 12 '19 12:09 peterclemenko

Same thing happened to me and I just renamed the folders examples into tabs and replaced all the instances of "Examples" with "Tabs" etc.

EDIT: If anyone else is struggling with this, be sure to include the renamed Tabs(Examples)Effects in the EffectsModule.forFeature() array:

EffectsModule.forFeature([TabsEffects, the tab compnents following])

ghost avatar Oct 29 '19 20:10 ghost