🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@ied/onesky

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ied/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.

npmnpm
Version
0.0.9
Version published
Weekly downloads
15
-85.29%
Maintainers
3
Weekly downloads
 
Created
Source

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 → translations.json

onesky import

Export

translations.json → en.json, fr.json, de.json, da.json

onesky export

Preview

Screenshot

FAQs

Package last updated on 17 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts