Skip to content

Integration

alexcibotari edited this page Feb 26, 2023 · 5 revisions

You will need to know your Firebase project ID, Space ID and host domain name.

Hosting domain names:

  • <firebase-project-id>.web.app
  • <firebase-project-id>.firebaseapp.com
  • custom domain name

To integrate with any framework you will need only to know the locale url. Every framework will allow you to configure url where your dictionary is located.

https://<host-domain-name>/api/v1/spaces/<space-id>/translations/<locale>

Angular

Checkout @lessify/angular-tools to synchronize or export local and Localess translations.

Angular Transloco

Detailed guid you can find on official Transloco site

@Injectable({ providedIn: 'root' })
export class TranslocoHttpLoader implements TranslocoLoader {
  constructor(private readonly http: HttpClient) {}

  getTranslation(lang: string): Observable<Translation> {
    return this.http.get<Translation>(`https://<host-domain-name>/api/v1/spaces/<space-id>/translations/${lang}`);
  }
}

React-intl

Official WebSite

React-i18next

Official WebSite

Vue-intl

Official WebSite

Vue-i18n

Official WebSite