From IT Skills
Jump to: navigation, search
  • UI application should be as fast as possible therefore it should store as less translations as possible.

Formats[edit | edit source]

What is Key[edit | edit source]

in Angular #xlif Key is 'custom id'+'meaning|description'. And it is very good that result sources do not contain keys making them smaller

in #dotNet Key is 'English text' therefore in order to simulate "'English text'+'meaning'" pattern the suffix _<meaning> should be added:

  • no suffix - action as several words or noun
  • _a - action, verb as causative sentence

JS[edit | edit source]

xlif[edit | edit source]

Json[edit | edit source]

composed key[edit | edit source]

    "HOME": {
        "TITLE": "Angular 2 Localization",

parameters[edit | edit source]

    "USER_NOTIFICATIONS": "{{ user }}, you have {{ NoMessages }} new messages",

what ready module to use?[edit | edit source]

dotNet[edit | edit source]

conversion from #dotNet format[edit | edit source]

Where to store English texts[edit | edit source]

English texts and messages keys are not stored in a xlf-compiled Angular application, but only in developer sources.

#dotNet resources store messages keys and are not memory efficient.

Get language for localization[edit | edit source]

in JS[edit | edit source]

browser language... navigator.language || navigator.userLanguage

import { LOCALE_ID } from '@angular/core'; constructor(@Inject(LOCALE_ID) protected localeId: string) {}

Apache Cordova Globalization

HTTP 'Accept-Language' header, but it appears this value is not available through javascript at all.

Deployment view[edit | edit source]


This category has the following 2 subcategories, out of 2 total.

Pages in category "Localization"

The following 2 pages are in this category, out of 2 total.