Skip to content

Latest commit

 

History

History
43 lines (24 loc) · 1.64 KB

README.md

File metadata and controls

43 lines (24 loc) · 1.64 KB

I18nCodeGenServer

Auto generate i18n static codes using ChatGPT

How to Use?

  1. Crate a project id like 'ce405725-a840-468d-a57f-0bb95cbfbcfb'

  2. Generate the first independent code module for multilingual using the ID above. Here is a Python example.

https://i18n.linkown.com/ce405725-a840-468d-a57f-0bb95cbfbcfb?file=languages.py&template=languages.py&languages=en,de,fr,az

languages.py is download file name. en,de,fr,az is the languages.

here is the languages.py:

  1. Put the downloaded file into your project.

  1. Replace call UText funcion in every UI string. When you run the software, you will find that the interface language of your software has not changed. Don't worry, during the running program, all the texts to be translated will be sent to the server.

  1. Download again, this time you will get a updated version that all text are translated. Set ULANG enviroment to other languages like de to check the effect.

Detail document check here

Run With Your Own Server

mv .env.example .env
pip install -r requirements.txt
uvicorn api:app --reload --port 1850 --host 0.0.0.0 --workers 1

replace https://i18n.linkown.com with the server address of your server