{"repo":"robisim74/angular-l10n","free":true,"listed":false,"github":"https://github.com/robisim74/angular-l10n","clone":"git clone https://github.com/robisim74/angular-l10n.git","description":"Angular library to translate texts, dates and numbers","language":"TypeScript","stars":375,"topics":["angular","typescript","translate","localization"],"license":"MIT","category":"ui-components","readme_excerpt":"Angular l10n Angular library to translate texts, dates and numbers This library is for localization of Angular apps. It allows, in addition to translation, to format dates and numbers through Internationalization API Table of Contents - Installation - Usage - Lazy loading - Localized routing - Server Side Rendering - Types - Contributing - Versions Installation Usage - Sample standalone app - Sample SSR app - Live example on StackBlitz Configuration Create the configuration: src/app/l10n-config.ts The implementation of L10nTranslationLoader class-interface above creates a js chunk for each translation file in the src/i18n/[language]/[asset].json folder during the build: src/i18n/en-US/app.json Note. The implementation above of L10nTranslationLoader is just an example: you can load the translation data in the way you prefer. Register the configuration: src/app/app.config.ts or with modules: src/app/app.module.ts Getting the translation Pure Pipes Pure pipes need to know when the locale changes. So import L10nLocale injection token in every component that uses them: or with modules: OnPush Change Detection Strategy To support this strategy, there is an Async version of each pipe, which recognizes by itself when the locale changes: Directives Directives manipulate the DOM APIs L10nTranslationService provides: - setLocale(locale: L10nLocale): Promise Changes the current locale and load the translation data - onChange(): Observable Fired every time the translation data has been lo","default_branch":null,"files":null,"tree":[],"storefront":"/r/robisim74","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/robisim74/angular-l10n/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}