I tring to use translate the text inside my renderd html But only the glitch text appear inside it I make translate module inside server module But only global components like navbar was translated
Any help !?
i fix it my usign custom loader get the translate from asstest by import json
custom Json loader
import { Observable, of } from "rxjs";
import { TranslateLoader } from "@ngx-translate/core";
export class JSONModuleLoader implements TranslateLoader {
TRANSLATIONS: {
ar: any,
en: any
}
constructor(TRANSLATIONS: any) {
this.TRANSLATIONS = TRANSLATIONS
}
getTranslation(lang: string): Observable<any> {
return of(this.TRANSLATIONS[lang]);
}
}
my module factory
import { JSONModuleLoader } from './translate/translateLoader';
import { AppTAr, AppTEn } from '../environments/translat';
let TRANSLATIONS = {
ar: AppTAr,
en: AppTEn
}
export function createTranslateLoader() {
return new JSONModuleLoader(TRANSLATIONS);
}
and it's work now :"D