npm package: @grandlinex/bundle-multilang
Description: > Multilang support for GrandLineX
Author: Elschnagoo
Latest version: 1.3.1

# GrandLineX Multilang Bundle

> Multilang support for GrandLineX 

## Description

<img alt="img" height="24" src="https://img.shields.io/static/v1?label=&amp;message=CORE&amp;color=black&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAAAAACPAi4CAAABJWlDQ1BJQ0MgcHJvZmlsZQAAKJGdkL9KxEAQxr/EQ0XORsVCLLawPbAxlY1/MFgcnLkIRqvcbg4PszFk9zh8A9/Ee5grBME38AUUrP02Wli4jQvD/Bhmvm9mgVCUUpvOPqAr28TJUXaVXYuVN3TRwQYOEObS1P3hWQrv+3xF4PJLz2n5+/58y6owknnBqGTdWCA4JEczWztmYOsuTU7Ij2ShdKXIc/Ke0sqxm010OZU/mm6bblFdDl2dsYsY5+hjAIERppighEWPuWLlFBHvFOxpkOMBBpK5RMHajD0WtyRDpRjHpJTEbTx+O63fgC4jakyo5Rzuoanp/OD+93vs46KdDLYXdd7kbWmJEY7HwPsTsJ4Bm8/A2o3Ha/X3bZ6eqO35541f9HxQa/wig0AAAAAJcEhZcwAAC7gAAAu4AT6yGBcAAAAHdElNRQflDAQSNSxPhIOMAAAEMElEQVRYw+2Wa0wUVxTH/3dmH+wgr4WdBWst4gIVwUAoxqJUwYatthCMtpVoE0usqY1pg/ShMTFpm6YiiWlMStLWEm0biqQE05qoLUIEIqlaHoW2yoLQxQWB3YVleezszuztB8XFFdoh/dKkO5/mnjnzmznnnnP+l/D4dxeDACAACAD+GwDF3z2LDNUvVYh3hxx2cfEAEp2bHa/jCECnh00/1Y0u5LfAQNG+smOFgsyuqKe78uzkvI5s8LzYp8pe4lniW7P8+sR2h2wAMR5PYf1jNaRdG5MLyD72xL2vU68oUhACACTG0DAjLwfLK5IJAHhMbR09U8Gr0zNiGAAQyz/2ygEoSwsZANRyqmaUAgBrOLhVBQCWnd1yQsh4hwMAU/G5qft7YGt8bBUBsMR1RUYlsrsjAMD6QQt9YJsouw0ATGaYjELiU90AvLWX5xoHKjcQAHbFfDlQ6DnvmN33BwlKALTf+cASF9tjWSrYALCrJvqpPyC25OkI0Vx1ZuFyP1b42fcVN/dPAcaTlsJhvxD4T9YOd3KJh8UzCwJYBaOOsbIA7IMWwT8HuzJ+L+7RvLXj2Zoc/aUX7tbG5+vM5yxxxq7HUwaqrdAVrOzzFeXN72yu7Uta84MuN3qZdCPXfsGJK+IRPjp1be4zsU1TPwuVL/YJ0+7W9AOuP5yC+/yK1Ga32zUontwi3DDwPJ810Z52Y7zX5Rl9Vf/eiDAzU2tgtFIbEqqrv/hUz3LLzrfkh361qy0ln7C60kOOrOV715kOnfB1JWFYwoT2F13UFsS8pvyo6NaWPIVAojDZFZQZqoJ0qpx2kKQ1OqKzouu0cmeaPoVWfMPEb3soas/nDernomKXTW9DGJvGmJg8zZ39P6gB0B6qOviy0uwiBHCLkgeMl6hB/Daf2jEDQuD4taO5+qri25zng9p1W1UuABTBsaR+INPne33D3pCIjQQAt13CnSEfxmyOtpv3hFQqrh0/YDTS26YoKoleOJrji8VurUQlCfBK9HRKdomnj/NSyfA+0PyhJFFJovCKkrX87Tfgru4kPFmeHTNUZwi/lKGvt0GzOXmkNdk0mdbbQrL0dWNhOQk9vyV3WYwaAgx3Z9ia1kdemNJuHm5CQk7I9avCo+0c92UIAPfRuoesmWVqAGgsof/YTLaZJAD09V/mDjBu30oCADoZ7ey4KAIg60q4OV57NpGF6vzRgfLnJh4Au1rfNduQwUVvht67662VAZj0ZKkAKJI3Ro0zrCqEz3238P778wDmU6aaNbuVANikxH0jTqqJ1CoJILHypU0oDc9TAAAbHj5rk+qyVfLVeezw1346JjWcmF6MvI8dPdLpmVP9zrPFVuei1NldVV9gTIhgCKGQxjuqfhS0ZjWAcdnqDIDTJz0ZqRLttzoHXQDhNQAm7IsABE5pAUAA8D8D/AUp6ovNs1/7jgAAAABJRU5ErkJggg==" />

GrandLineX is an out-of-the-box server framework.


[![GitHub](https://badge.fury.io/gh/grandlinex%2Fbundle-multilang.svg)](https://github.com/GrandlineX/bundle-multilang)
[![NPM](https://img.shields.io/static/v1?label=NPM&message=Package&color=red&logo=NPM)](https://www.npmjs.com/package/@grandlinex/bundle-multilang)
![TS](https://img.shields.io/static/v1?label=Language&message=TypeScript&color=blue&logo=TypeScript)


### Status
![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-multilang&metric=alert_status)
![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-multilang&metric=security_rating)
![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-multilang&metric=sqale_rating)
![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-multilang&metric=reliability_rating)
![Coverage](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-multilang&metric=coverage)

### Issues
![Bugs](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-multilang&metric=bugs)
![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-multilang&metric=vulnerabilities)
![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=GrandlineX_bundle-multilang&metric=code_smells)


##  Store Variables

| Key | Description                       |
|-----|-----------------------------------|
| GLX_TRANSLATION_PATH | Path to translation *.json  files |


## Install 

### Example

```typescript

class TestKernel extends CoreKernel<any> {
  constructor(appName:string, appCode:string) {
    super( { appName, appCode});
    
    // ...

    /** 
     * optional set the root path for translations
     * -> alternatively you can pass the path in  .env file GLX_TRANSLATION_PATH=$PATH
     */
    const pathToTranslation=""; //  Set path to folder containing translation files
    const store = this.getConfigStore();
    store.set(LangClient.STORE_TRANSLATION_PATH,pathToTranslation)

    
    const defaultLangKey="en"; // Set the default lang key
    this.addModule(new LangModule(this,defaultLangKey));
    
  }
}

```

### Translation format

File naming $key-$name.json like en-English.json or de-German.json

```json
{
  "test.key.first": "helloWorldEn",
  "test.key.second": "helloWorld2En"
}
```

## Documentation
- [Documentation](https://grandlinex.github.io/bundle-multilang/)
- [GrandLineX Docs](https://grandlinex.github.io/docs/)
- [GrandLineX Project](https://grandlinex.github.io/)