chfw / bendihua

translate your i18n file into 106 languages using googletrans api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bendihua - 本地化 - स्थानीयकरण - локализация - Lokalisierung - Localização - localize

https://travis-ci.org/chfw/bendihua.svg?branch=master

One of my colleague had claimed that it is not possible to get the UI in his language. "Try yoruba!", said he. "OK... (66seconds), Done! Can you come and have a look?", I said. "Oh my god! 'Ede' for language,...", he was impressed.

Go and localize your tranlsation.json file. Impress your colleages as you have done a great job, i18n in a few minutes!

Usage

Given your locale as en.json:

{
   "ui-button": "hello world"
}

You run: bdh en.json -d zh-cn and will get output-zh-cn.json as:

{
   "ui-button": "你好,世界“
}

What you run bdh en.json -d hi? You will get it in Hindi:

{
    "ui-button": "नमस्ते दुनिया"
}

And it automatically supports aurelia-i18n locale format.

Command line options

::

usage: bdh [-h] [-d DEST_LANGUAGE] [-o OUTPUT] locale.json

positional arguments:
locale.json locale dictionary where keys are engineering tokens
and values are actual user interface words
optional arguments:
-h, --help show this help message and exit
-d DEST_LANGUAGE, --dest-language DEST_LANGUAGE
 Destination language short code
-o OUTPUT, --output OUTPUT
 select a name for the output file. if omitted, output name is defaulted to output-{dest-language}.json

Supported languages

language short code
afrikaans af
albanian sq
amharic am
arabic ar
armenian hy
azerbaijani az
basque eu
belarusian be
bengali bn
bosnian bs
bulgarian bg
catalan ca
cebuano ceb
chichewa ny
chinese (simplified) zh-cn
chinese (traditional) zh-tw
corsican co
croatian hr
czech cs
danish da
dutch nl
english en
esperanto eo
estonian et
filipino tl
finnish fi
french fr
frisian fy
galician gl
georgian ka
german de
greek el
gujarati gu
haitian creole ht
hausa ha
hawaiian haw
hebrew iw
hindi hi
hmong hmn
hungarian hu
icelandic is
igbo ig
indonesian id
irish ga
italian it
japanese ja
javanese jw
kannada kn
kazakh kk
khmer km
korean ko
kurdish (kurmanji) ku
kyrgyz ky
lao lo
latin la
latvian lv
lithuanian lt
luxembourgish lb
macedonian mk
malagasy mg
malay ms
malayalam ml
maltese mt
maori mi
marathi mr
mongolian mn
myanmar (burmese) my
nepali ne
norwegian no
pashto ps
persian fa
polish pl
portuguese pt
punjabi pa
romanian ro
russian ru
samoan sm
scots gaelic gd
serbian sr
sesotho st
shona sn
sindhi sd
sinhala si
slovak sk
slovenian sl
somali so
spanish es
sundanese su
swahili sw
swedish sv
tajik tg
tamil ta
telugu te
thai th
turkish tr
ukrainian uk
urdu ur
uzbek uz
vietnamese vi
welsh cy
xhosa xh
yiddish yi
yoruba yo
zulu zu

Installation

You can install bendihua via pip:

$ pip install bendihua

or clone it and install it:

$ git clone https://github.com/chfw/bendihua.git
$ cd bendihua
$ python setup.py install

License

MIT

About

translate your i18n file into 106 languages using googletrans api

License:MIT License


Languages

Language:Python 97.6%Language:Shell 1.8%Language:Makefile 0.6%