mini-trans

1.0.1 • Public • Published

Install

yarn add mini-trans

Use

import { makeTranslations } from "mini-trans"

const translations = {
  da: {
    "Hello World": "Hej Verden"
  },
  de: {
    "Hello World: "Hallo Welt"
  }
}

let t = makeTranslations(translations, "de")
t("Hello World")
// Hallo Welt

t = makeTranslations(translations, "da")
t("Hello World")
// Hej Verden

Readme

Keywords

none

Package Sidebar

Install

npm i mini-trans

Weekly Downloads

34

Version

1.0.1

License

MIT

Unpacked Size

3.35 kB

Total Files

9

Last publish

Collaborators

  • kjkta