Creating or Updating
Navigate to your tools folder in the Shinobi directory. If you used the Ninja Installer the default directory is /home/Shinobi
Then run the script to create a new file. This translator uses the Yandex Translator.
node translateLanguageFile.js <SOURCE> <FROM_LANGUAGE> <TO_LANGUAGE>
Here is an example of translating Canadian English to Arabic. This will create or update a file in your languages folder called ar.json. The languages folder is located in the main directory of Shinobi.
node translateLanguageFile.js en_CA en ar
Creating and Updating use the same command. If the file doesn't exist it will make it. If it does exist it will update it. Simple :)
Below is a list of supported options for the <FROM_LANGUAGE> and <TO_LANGUAGE> parameters. For an updated list please visit Yandex's Website.
Please be respectful with the translation tool as it uses Yandex's servers for the queries. Each variable that doesn't exist in the destination language file will be queried for a translation. So if your destination file is missing 1000 terms from the source file it will send 1000 translation queries.
If you want to make a language file manually I highly recommend that you create a base file with the translator first then correct spelling and grammar.
It was easy to integrate but I am open to other solutions. I have also been told on many occasions the translations are just bad. So I really would appreciate any info on this.
Thank you to everyone who manually made language files!.. but because Shinobi is still very young it is constantly growing at a very quick pace. This means the addition of many more terms and definitions. Until next time, Cheers!