@ludens-reklame/vasadu
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Vasadu

Makes your localization life a breeze!

Install

yarn add @ludens-reklame/vasadu

Usage

import Vasadu from '@ludens-reklame/vasadu';

// Define your translation tree
const myLocalizationTheme = {
  buttonText: {
    publish: {
      en: 'Publish',
      no: 'Publiser'
    }
  },
  intro: {
    en: 'Welcome to our site',
    no: 'Velkommen til vår side'
  }
};

// Initialize Vasadu class, and giving it our theme and wanted locale.
const localization = new Vasadu(myLocalizationTheme, 'no');

// Now we can access deep nested values with completed translations:
localization.si('buttonText.publish'); // Publiser

Contribute

If you want to contribute in any way, feel free to create issues, or send pull requests!

vasadu

Readme

Keywords

none

Package Sidebar

Install

npm i @ludens-reklame/vasadu

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

4.74 kB

Total Files

10

Last publish

Collaborators

  • emilswebbod
  • stianba
  • oyvindhermansen