Skip to content

A simple and lightweight package to integrate internationalization on a small website.

License

Notifications You must be signed in to change notification settings

jdbruxelles/si18n.js

Repository files navigation

Netlify Status wakatime Crowdin jsDelivr

si18n.js

This project is a simple package to integrate internationalization on a small web site project.

The "s" in si18n stands for simple.

Fast Lightweight No dependencies Easy to use
Yes Yes Yes Yes

Demo and Documentation

You can :

Installation

npm

Installation using npm...

npm i si18n.js

then use the si18n class:

import si18n from "si18n.js";

yarn

yarn add si18n.js

CDN

<script type="module" src="https://unpkg.com/si18n.js"></script>
<!-- or -->
<script type="module" src="https://unpkg.com/si18n.min.js"></script>

Usage

For detailed usage information, visit the docs.

Run locally

The following instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Requirements

Clone the repo

git clone git@github.com:jdbruxelles/si18n.js.git

Install the dependencies

npm install

Gulp Tasks

  • The default build task (run once)
gulp
  • Automatically rerun the build task when a script file changes
gulp watch

Server

For the server, you can use any server you want, but I recommend using http-server. It's a simple zero-configuration command-line http server. I personally use the server provided by netlify-cli to work locally.

Contributing

Contributions are always welcome! For major changes, please open an issue first to discuss what you would like to change.

Traduction

You can help translate the application by using Crowdin.

All translations are stored in the /locales directory. Under no circumstances should you edit the files in this directory, except for the index.js and fr.json files which are the source language for the translations.

Translations will be available on the app if they exceed a certain threshold of completion (currently 90%).

Licence

MIT License