All Projects β†’ andreruffert β†’ i18n-literally

andreruffert / i18n-literally

Licence: other
🍦 A simple way to introduce internationalization to your JS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to i18n-literally

Mojito
An automation platform that enables continuous localization.
Stars: ✭ 256 (+220%)
Mutual labels:  internationalization, localization, l10n
React Native Globalize
Internationalization (i18n) for React Native
Stars: ✭ 246 (+207.5%)
Mutual labels:  internationalization, localization, l10n
Laravel Js Localization
🌐 Convert your Laravel messages and consume them in the front-end!
Stars: ✭ 451 (+463.75%)
Mutual labels:  internationalization, localization, l10n
Weblate
Web based localization tool with tight version control integration.
Stars: ✭ 2,719 (+3298.75%)
Mutual labels:  internationalization, localization, l10n
Serge
Continuous localization platform
Stars: ✭ 212 (+165%)
Mutual labels:  internationalization, localization, l10n
labels
Bolt Labels extension - Translatable labels for Bolt
Stars: ✭ 18 (-77.5%)
Mutual labels:  internationalization, localization, l10n
Pseudo Localization
Dynamic pseudo-localization in the browser and nodejs
Stars: ✭ 109 (+36.25%)
Mutual labels:  internationalization, localization, l10n
Angular-Gulp-Boilerplate
Clean but full-featured AngularJS boilerplate using Gulp workflow and best practices
Stars: ✭ 30 (-62.5%)
Mutual labels:  internationalization, localization, l10n
Redux React I18n
An i18n solution for React/Redux and React Native projects
Stars: ✭ 64 (-20%)
Mutual labels:  internationalization, localization, l10n
Fluent
Fluent β€” planning, spec and documentation
Stars: ✭ 818 (+922.5%)
Mutual labels:  internationalization, localization, l10n
i18n
Package i18n is for app Internationalization and Localization.
Stars: ✭ 79 (-1.25%)
Mutual labels:  internationalization, localization, l10n
Keys Translations Manager
KTM, a locale management web app built on MERN stack, lets you manage and control locales in one place. It's particularly useful for someone who needs to manage multiple internationalization/localization projects.
Stars: ✭ 81 (+1.25%)
Mutual labels:  internationalization, localization, l10n
python-fluent
Python implementation of Project Fluent
Stars: ✭ 142 (+77.5%)
Mutual labels:  internationalization, localization, l10n
Dom I18n
Provides a very basic HTML multilingual support using JavaScript
Stars: ✭ 125 (+56.25%)
Mutual labels:  internationalization, localization, l10n
rosetta
A blazing fast internationalization (i18n) library for Crystal with compile-time key lookup.
Stars: ✭ 23 (-71.25%)
Mutual labels:  internationalization, localization, l10n
Fluent Rs
Rust implementation of Project Fluent
Stars: ✭ 503 (+528.75%)
Mutual labels:  internationalization, localization, l10n
i18n
internationalize projects to Arabic
Stars: ✭ 67 (-16.25%)
Mutual labels:  internationalization, localization, l10n
inlang
Open Source Localization Solution for Software.
Stars: ✭ 160 (+100%)
Mutual labels:  internationalization, localization, l10n
Fluent.js
JavaScript implementation of Project Fluent
Stars: ✭ 622 (+677.5%)
Mutual labels:  internationalization, localization, l10n
Locale2
πŸ’ͺ Try as hard as possible to detect the client's language tag ("locale") in node or the browser. Browserify and Webpack friendly!
Stars: ✭ 65 (-18.75%)
Mutual labels:  internationalization, localization, l10n

i18n-literally

A simple way to introduce internationalization to your JS.

CI status npm version npm downloads

Install

$ npm install i18n-literally

Usage

import i18n from 'i18n-literally';
import db from './i18n.db.json';

// Set the database
i18n.db = db;

// 1. Write in the default language
i18n`Hello ${'World'}!`
// => Hello World!

// 2. Add/update your translations for a language
"$ npx i18n-literally index.js es"

// 3. Get translations based on locale
i18n.locale = 'es';
i18n`Hello ${'World'}!`
// => Hola World!

Write your entire application in the default language, and support multiple versions of the language by simply changing the i18n.locale. To Add/update translations simply run the cli.

API

i18n`template`

Returns a string based on the locale (default "en").

i18n.locale

Type: string Default: en

i18n.db

Type: object Default: {}

CLI

The cli helps you to easily maintain your translations in a simple web app. All translations are stored in a i18n.db.json file.

$ npx i18n-literally --help

  Usage:
    $ literally <cmd> <entry> <locale> [db]

  Arguments:
    <cmd>       Command defaults to "edit" (edit, check-missing-translations)
    <entry>     The entry file of your app
    <locale>    Locale to add/update translations for
    [db]        Database file defaults to "./i18n.db.json"

  Options:
    --root      Project's root directory (default: $PWD)
    --rootAlias Alias used by imports for project's root
    --help      Show information
    --version   Show current version

  Examples:
    $ literally edit ./index.js es
    $ literally edit ./src/index.js en --root=src --rootAlias=~

The cli web app to add/update translations. alt text

Related

Inspired by this post from Andrea Giammarchi.

License

MIT Β© AndrΓ© Ruffert

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].