Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Celtian/ngx-translate-version
Angular module that provides version to your language files
https://github.com/Celtian/ngx-translate-version
angular library
Last synced: 1 day ago
JSON representation
Angular module that provides version to your language files
- Host: GitHub
- URL: https://github.com/Celtian/ngx-translate-version
- Owner: Celtian
- License: mit
- Created: 2023-04-16T17:18:50.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-18T21:31:33.000Z (29 days ago)
- Last Synced: 2024-11-12T16:05:35.205Z (4 days ago)
- Topics: angular, library
- Language: TypeScript
- Homepage: https://celtian.github.io/ngx-translate-version
- Size: 1.95 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
- fucking-awesome-angular - ngx-translate-version - Angular module that provides version to your language files. (Table of contents / Angular)
- awesome-angular - ngx-translate-version - Angular module that provides version to your language files. (Table of contents / Angular)
README
NgxTranslateVersion
[![npm version](https://badge.fury.io/js/ngx-translate-version.svg)](https://badge.fury.io/js/ngx-translate-version)
[![Package License](https://img.shields.io/npm/l/ngx-translate-version.svg)](https://www.npmjs.com/ngx-translate-version)
[![NPM Downloads](https://img.shields.io/npm/dm/ngx-translate-version.svg)](https://www.npmjs.com/ngx-translate-version)
[![Snyk](https://snyk.io/advisor/npm-package/ngx-translate-version/badge.svg)](https://snyk.io/advisor/npm-package/ngx-translate-version)
[![stars](https://badgen.net/github/stars/celtian/ngx-translate-version)](https://github.com/celtian/ngx-translate-version/)
[![forks](https://badgen.net/github/forks/celtian/ngx-translate-version)](https://github.com/celtian/ngx-translate-version/)
[![HitCount](http://hits.dwyl.com/celtian/ngx-translate-version.svg)](http://hits.dwyl.com/celtian/ngx-translate-version)> Angular module that provides version to your language files
> ✓ _Angular 18 compatible_
Here's the [demo](http://celtian.github.io/ngx-translate-version/)
## Install
1. Use yarn (or npm) to install the package
```terminal
yarn add ngx-translate-version
```2. Add `provideTranslateVersion` into your config
```typescript
import { NgxAppVersionModule } from 'ngx-app-version';export const appConfig: ApplicationConfig = {
providers: [
// ...
provideTranslateVersion(routes, {
defaultLanguage: 'en',
version: '1.0.0',
pathLocales: 'assets/locales.json',
pathI18n: (lang) => `assets/i18n/${lang}.json`
})
]
};
```or module
```typescript
import { NgxAppVersionModule } from 'ngx-app-version';@NgModule({
// ...
providers: [
// ...
provideTranslateVersion(routes, {
defaultLanguage: 'en',
version: '1.0.0',
pathLocales: 'assets/locales.json',
pathI18n: (lang) => `assets/i18n/${lang}.json`
})
]
})
```## Options
| Option | Type | Default | Description |
| ------------------- | ------------------------ | ------------------------------------ | ------------------------------------- |
| **defaultLanguage** | string | `en` | Default language of your appliceation |
| **version** | string | `0.0.0` | Version of your application |
| **pathLocales** | string | `assets/locales.json` | Path to file with locales |
| **pathI18n** | (lang: string) => string | `(lang) => assets/i18n/${lang}.json` | Path to faile with translations |## Compatibility
| Angular | ngx-translate-version | Install |
| ------- | --------------------- | ---------------------------------- |
| 18 | 3.x | `yarn add ngx-translate-version` |
| 17 | 2.x | `yarn add ngx-translate-version@2` |
| 16 | 1.x | `yarn add ngx-translate-version@1` |
| 15 | 0.x | `yarn add ngx-translate-version@0` |## Peer Dependencies
```
"@angular/common": ">=18",
"@angular/core": ">=18",
"@gilsdav/ngx-translate-router-http-loader": ">=2",
"@gilsdav/ngx-translate-router": ">=7",
"@ngx-translate/core": ">=15",
"@ngx-translate/http-loader": ">=8"
```## License
Copyright © 2023 - 2024 [Dominik Hladik](https://github.com/Celtian)
All contents are licensed under the [MIT license].
[mit license]: LICENSE