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 |
You can :
Installation using npm...
npm i si18n.js
then use the si18n
class:
import si18n from "si18n.js";
yarn add si18n.js
<script type="module" src="https://unpkg.com/si18n.js"></script>
<!-- or -->
<script type="module" src="https://unpkg.com/si18n.min.js"></script>
For detailed usage information, visit the docs.
The following instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
git clone git@github.com:jdbruxelles/si18n.js.git
npm install
- The default build task (run once)
gulp
- Automatically rerun the build task when a script file changes
gulp watch
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.
Contributions are always welcome! For major changes, please open an issue first to discuss what you would like to change.
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%).