Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

Languages

David García edited this page Nov 19, 2018 · 1 revision

NEMPay is available in the following languages.

  • Catalan
  • Chinese
  • English
  • German
  • Japanese
  • Korean
  • Polish
  • Russian
  • Spanish

Adding a new language

  1. Go to src/assets/i18n/ and create a new jsonfile. It should be named as the code of the language to be added.

    On this site you can find the the language's code (BCP-47 compliant language identifier)

    For example, if we would like to add Italian, we would create the file it-IT.json.

    Note: If for example, you create es.json instead of ES-es.json, it will work for all Spanish variations.

  2. Copy and paste the following content into the file just created.

  3. Go to src/providers/language/language.provider.ts and add to this.availableLanguages array the new language code under the constructor:

        constructor(...) {
    
            this.availableLanguages = ['en', 'es','ca', 'ko', 'ru', 'pl', 'ja', 'de', 'it'];
            ...
        }

Editing an existing language

  1. Edit the language file under src/assets/i18n/

  2. Find the string to edit, for example "PLEASE_WAIT": "Please wait...",

  3. Change the right part, next to ':'. "PLEASE_WAIT": "Wait please...", Ensure that quotations wrapping the sentence and commas are not deleted!

Removing languages

Go to src/providers/language/language.provider.ts and remove the language you want to delete under this.availableLanguages array.

Setting a language by default

Go to src/providers/language/language.provider.ts and change the language for that one that should be default language.

    constructor(...) {
        ...
        this.defaultLanguage = 'en';
    }