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]

What is Key[edit]

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]

xlif[edit]

Json[edit]

composed key[edit]

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

parameters[edit]

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

what ready module to use?[edit]

dotNet[edit]

conversion from #dotNet format[edit]

Where to store English texts[edit]

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]

in JS[edit]

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]

Subcategories

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.