Skip to content

dolphin2410-archive/MultiLanguage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MultiLanguage

Introduction

MultiLanguage is an application that allows users to setup an easy json database for multiple language suuport in their application. It programmed with python without any dependencies, so you can just execute this program only with the MultiLanguage.py file

Usage

Using as a library

If you are a python developer, install this as a depdency by executing

pip install MultiLanguage
from MultiLanguage.MultiLanguage import *


LanguageAdder.add("database.json", [("english", "pumpkin"), ("korean": "호박")])
LanguageAccessorFactory.create("database.json", "pumpkin").get("korean") # 호박

Using as a program

Notice: This requires at least python 3.9 to be installed in your computer.

  1. To use this as an application, copy the file from MultiLanguage/MultiLanguage.py and place it to your project root.
  2. To add words to the database, you will have to pass a parameter <[language]> and <value in [language]>. Here is an example.
python MultiLanguage.py english pumpkin korean 호박
  1. If you have spaces in <[language]> or <value in [language]>, wrap it with double quotes.
python MultiLanguage.py "en us" pumpkin "ko" 호박 "vi" "quả bí ngô"
  1. This will modify the json file in format like
[
  {"english": "pumpkin", "korean": "호박"},
  {"en us": "pumpkin", "ko": "호박", "vi": "quả bí ngô"}
]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages