1.0.2 • Published 10 months ago

@grandlinex/bundle-multilang v1.0.2

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
10 months ago

GrandLineX Multilang Bundle

Multilang support for GrandLineX

Description

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

GitHub NPM TS

Status

Quality Gate Status Security Rating Maintainability Rating Reliability Rating Coverage

Issues

Bugs Vulnerabilities Code Smells

Store Variables

KeyDescription
GLX_TRANSLATION_PATHPath to translation *.json files

Install

Example

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

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

Documentation

1.0.2

10 months ago

1.0.1

12 months ago

1.0.0

12 months ago

0.32.2

2 years ago

0.32.1

2 years ago

0.32.0

2 years ago

0.31.0

2 years ago

0.30.2

2 years ago

0.30.1

2 years ago

0.30.0

2 years ago

0.28.0

2 years ago

0.27.1

2 years ago

0.27.0

3 years ago

0.26.0

3 years ago

0.25.1

3 years ago

0.25.0

3 years ago

0.24.0

3 years ago

0.23.1

3 years ago

0.23.0

3 years ago

0.22.0

3 years ago

0.19.0

4 years ago

0.17.2

4 years ago

0.21.0

3 years ago

0.20.0

3 years ago

0.17.0

4 years ago

0.18.0

4 years ago

0.17.1

4 years ago

0.16.1

4 years ago

0.16.0

4 years ago