@taiga-ui/i18n

A package with tools for Taiga UI library i18n

Usage no npm install needed!

<script type="module">
  import taigaUiI18n from 'https://cdn.skypack.dev/@taiga-ui/i18n';
</script>

README

Taiga UI — i18n

npm version Discord

WebsiteDocumentationCDK WikiCore team

A package with tools for Taiga UI library i18n

Supported languages:

Language Constant name Coverage
English (by default) TUI_ENGLISH_LANGUAGE 100%
Russian TUI_RUSSIAN_LANGUAGE 100%
Spanish TUI_SPANISH_LANGUAGE 100%
German TUI_GERMAN_LANGUAGE 100%
Turkish TUI_TURKISH_LANGUAGE 100%
Dutch TUI_DUTCH_LANGUAGE 100%
Ukrainian TUI_UKRAINIAN_LANGUAGE 100%
French TUI_FRENCH_LANGUAGE 100%
Vietnamese TUI_VIETNAMESE_LANGUAGE 100%
Portuguese TUI_PORTUGUESE_LANGUAGE 100%
Italian TUI_ITALIAN_LANGUAGE 100%
Polish TUI_POLISH_LANGUAGE 100%

It's a part of Taiga UI that is fully-treeshakable Angular UI Kit consisting of multiple base libraries and several add-ons

How to install

If you have @taiga-ui/core in your app, you do not need to install anything. i18n package is included as a dependency.

How to use

You have English by default.

If you want to change it, you need to provide TUI_LANGUAGE token in your app.module:

import {TUI_LANGUAGE, TUI_RUSSIAN_LANGUAGE} from '@taiga-ui/i18n';

// app.module
@NgModule({
  // ...
  providers: [
    {
      provide: TUI_LANGUAGE,
      useValue: of(TUI_RUSSIAN_LANGUAGE),
    },
  ],
})
export class AppModule {}

You can also switch languages on the fly. Use useFactory or useClass with a service to make a stream of dictionaries.

How to add a language

Feel free to add new languages!

  1. Go to languages folder
  2. Copy english folder and rename new folder with the name of language you speak
  3. Translate entities in files. If you need some clarification, take a look at interfaces of entities. If you need more, please write to us via issues or any other way of contact :)

Thank you!