@ied/onesky

0.0.13 • Public • Published

onesky

Import/export translations from/to OneSky and use them to translate text directly in your app. No dependency, it runs at frontend and backend.

How to ?

Use translation algorithm

import OneSky from '@ied/onesky'
import translations from './translations.json'

const i18n = new OneSky(translations, 'fr')

// translate "completed" to french feminine plural
i18n.translate('completed', 'fp')

// translate with variables
i18n.translate('hi ${firstName} ${lastName}', null, {
  firstName: Bruce,
  lastName: Wayne
})

Convert

You can see an overview of the format in this issue or browsing project files.

npm i -g @ied/onesky

Import

en.json, fr.json, de.json, da.json, es.json, fr_CA.jsontranslations.json

onesky import

Export

translations.jsonen.json, fr.json, de.json, da.json, es.json, fr_CA.json

onesky export

Preview

Screenshot

Readme

Keywords

none

Package Sidebar

Install

npm i @ied/onesky

Weekly Downloads

1

Version

0.0.13

License

MIT

Unpacked Size

107 kB

Total Files

16

Last publish

Collaborators

  • vibbou
  • lfalorni