Fotogram.ai의 후원 - AI와 함께 셀카를 걸작으로 변환
https://fotogram.ai
AI / 무료 JSON & YAML 번역가?
이 패키지는 JSON/YAML 파일 또는 JSON 객체를 다른 언어로 무료로 번역 할 수 있습니다.
| 번역 모듈 | 지원하다 | 무료 |
|---|---|---|
| Google 번역 | ✅ | ✅ FREE |
| Google 번역 2 | ✅ | ✅ FREE |
| Microsoft Bing 번역 | ✅ | ✅ FREE |
| libre 번역 | ✅ | ✅ FREE |
| Argos는 번역합니다 | ✅ | ✅ FREE |
| Deepl 번역 | ✅ | require API KEY (DEEPL_API_KEY as env)optional API URL (DEEPL_API_URL as env) |
| GPT-4O | ✅ | require API KEY (OPENAI_API_KEY as env) |
| GPT-3.5 터보 | ✅ | require API KEY (OPENAI_API_KEY as env) |
| GPT-4 | ✅ | require API KEY (OPENAI_API_KEY as env) |
| GPT-4O- 미니 | ✅ | require API KEY (OPENAI_API_KEY as env) |
| 번역 모듈 | 지원하다 | 무료 |
|---|---|---|
| Google 번역 | ✅ | ✅ FREE |
| Google 번역 2 | ✅ | ✅ FREE |
| Microsoft Bing 번역 | ✅ | ✅ FREE |
| libre 번역 | ✅ | ✅ FREE |
| Argos는 번역합니다 | ✅ | ✅ FREE |
| Deepl 번역 | ✅ | require API KEY (DEEPL_API_KEY as env)optional API URL (DEEPL_API_URL as env) |
| GPT-4O | ✅ | require API KEY (OPENAI_API_KEY as env) |
| GPT-3.5 터보 | ✅ | require API KEY (OPENAI_API_KEY as env) |
| GPT-4 | ✅ | require API KEY (OPENAI_API_KEY as env) |
| GPT-4O- 미니 | ✅ | require API KEY (OPENAI_API_KEY as env) |
Browser support will come soon...
지원되는 언어
npm i @parvineyvazov/json-translatornpm i -g @parvineyvazov/json-translatorjsontt < your/path/to/file.json >
or
jsontt < your/path/to/file.yaml/yml > [path] : 필수 JSON/YAML 파일 경로 <your/path/to/file.json>[path] : 선택적 프록시 목록 TXT 파일 경로 <your/path/to/proxy_list.txt> -V, --version output the version number
-m, --module <Module> specify translation module
-f, --from <Language> from language
-t, --to <Languages...> to translates
-n, --name <string> optional ↵ | output filename
-fb, --fallback <string> optional ↵ | fallback logic,
try other translation modules on fail | yes, no | default: no
-cl, --concurrencylimit <number> optional ↵ | set max concurrency limit
(higher faster, but easy to get banned) | default: 3
-h, --help display help for command
Google Translate를 사용하여 JSON 파일 번역 :
jsontt < your/path/to/file.json > --module google --from en --to ar fr zh-CNjsontt < your/path/to/file.json > --module google --from en --to ar fr zh-CN --name myFilesjsontt < your/path/to/file.json > --module google --from en --to ar fr zh-CN --name myFiles --fallback yesjsontt < your/path/to/file.json > --module google --from en --to ar fr zh-CN --name myFiles --fallback yes --concurrencylimit 10jsontt file.jsonjsontt folder/file.jsonjsontt " folderfile.json " jsontt " C:folder1folderen.json "jsontt file.json proxy.txt결과는 원래 JSON/YAML 파일과 동일한 폴더에 있습니다.
jsontt -hjsontt --helpJavaScript의 경우
const translator = require ( '@parvineyvazov/json-translator' ) ;TypeScript 용 :
import * as translator from '@parvineyvazov/json-translator' ; // Let`s translate `Home sweet home!` string from English to Chinese
const my_str = await translator . translateWord (
'Home sweet home!' ,
translator . languages . English ,
translator . languages . Chinese_Simplified
) ;
// my_str: 家,甜蜜的家! JavaScript의 경우
const translator = require ( '@parvineyvazov/json-translator' ) ;TypeScript 용 :
import * as translator from '@parvineyvazov/json-translator' ; /*
Let`s translate our deep object from English to Spanish
*/
const en_lang : translator . translatedObject = {
login : {
title : 'Login {{name}}' ,
email : 'Please, enter your email' ,
failure : 'Failed' ,
} ,
homepage : {
welcoming : 'Welcome!' ,
title : 'Live long, live healthily!' ,
} ,
profile : {
edit_screen : {
edit : 'Edit your informations' ,
edit_age : 'Edit your age' ,
number_editor : [
{
title : 'Edit number 1' ,
button : 'Edit 1' ,
} ,
{
title : 'Edit number 2' ,
button : 'Edit 2' ,
} ,
] ,
} ,
} ,
} ;
/*
FOR JavaScript don`t use translator.translatedObject (No need to remark its type)
*/
let es_lang = await translator . translateObject (
en_lang ,
translator . languages . English ,
translator . languages . Spanish
) ;
/*
es_lang:
{
"login": {
"title": "Acceso {{name}}",
"email": "Por favor introduzca su correo electrónico",
"failure": "Fallida"
},
"homepage": {
"welcoming": "¡Bienvenidas!",
"title": "¡Vive mucho tiempo, vivo saludable!"
},
"profile": {
"edit_screen": {
"edit": "Edita tus informaciones",
"edit_age": "Editar tu edad",
"number_editor": [
{
"title": "Editar número 1",
"button": "Editar 1"
},
{
"title": "Editar número 2",
"button": "Editar 2"
}
]
}
}
}
*/ JavaScript의 경우
const translator = require ( '@parvineyvazov/json-translator' ) ;TypeScript 용 :
import * as translator from '@parvineyvazov/json-translator' ; /*
Let`s translate our object from English to French, Georgian and Japanese in the same time:
*/
const en_lang : translator . translatedObject = {
login : {
title : 'Login' ,
email : 'Please, enter your email' ,
failure : 'Failed' ,
} ,
edit_screen : {
edit : 'Edit your informations' ,
number_editor : [
{
title : 'Edit number 1' ,
button : 'Edit 1' ,
} ,
] ,
} ,
} ;
/*
FOR JavaScript don`t use translator.translatedObject (No need to remark its type)
*/
const [ french , georgian , japanese ] = ( await translator . translateObject (
en_lang ,
translator . languages . Automatic ,
[
translator . languages . French ,
translator . languages . Georgian ,
translator . languages . Japanese ,
]
) ) as Array < translator . translatedObject > ; // FOR JAVASCRIPT YOU DO NOT NEED TO SPECIFY THE TYPE
/*
french:
{
"login": {
"title": "Connexion",
"email": "S'il vous plaît, entrez votre email",
"failure": "Manquée"
},
"edit_screen": {
"edit": "Modifier vos informations",
"number_editor": [
{
"title": "Modifier le numéro 1",
"button": "Éditer 1"
}
]
}
}
georgian:
{
"login": {
"title": "Შესვლა",
"email": "გთხოვთ, შეიყვანეთ თქვენი ელ",
"failure": "მცდელობა"
},
"edit_screen": {
"edit": "თქვენი ინფორმაციათა რედაქტირება",
"number_editor": [
{
"title": "რედაქტირების ნომერი 1",
"button": "რედაქტირება 1"
}
]
}
}
japanese:
{
"login": {
"title": "ログイン",
"email": "あなたのメールアドレスを入力してください",
"failure": "失敗した"
},
"edit_screen": {
"edit": "あなたの情報を編集します",
"number_editor": [
{
"title": "番号1を編集します",
"button": "編集1を編集します"
}
]
}
}
*/ JavaScript의 경우
const translator = require ( '@parvineyvazov/json-translator' ) ;TypeScript 용 :
import * as translator from '@parvineyvazov/json-translator' ; /*
Let`s translate our json file into another language and save it into the same folder of en.json
*/
let path = 'C:/files/en.json' ; // PATH OF YOUR JSON FILE (includes file name)
await translator . translateFile ( path , translator . languages . English , [
translator . languages . German ,
] ) ; ── files
├── en.json
└── de.jsonJavaScript의 경우
const translator = require ( '@parvineyvazov/json-translator' ) ;TypeScript 용 :
import * as translator from '@parvineyvazov/json-translator' ; /*
Let`s translate our json file into multiple languages and save them into the same folder of en.json
*/
let path = 'C:/files/en.json' ; // PATH OF YOUR JSON FILE (includes file name)
await translator . translateFile ( path , translator . languages . English , [
translator . languages . Cebuano ,
translator . languages . French ,
translator . languages . German ,
translator . languages . Hungarian ,
translator . languages . Japanese ,
] ) ; ── files
├── en.json
├── ceb.json
├── fr.json
├── de.json
├── hu.json
└── ja.json 번역에서 단어를 무시하려면 {{word}} 또는 {word} 스타일을 객체에서 사용하십시오.
{
"one": "Welcome {{name}}",
"two": "Welcome {name}",
"three": "I am {name} {{surname}}"
}
...translating to spanish
{
"one": "Bienvenido {{name}}",
"two": "Bienvenido {name}",
"three": "Soy {name} {{surname}}"
}
JSONTT는 또한 텍스트의 URL 무시합니다. 이는 때때로 번역이 주어진 문자열의 URL을 망치면서 해당 문자열을 번역하는 것을 의미합니다. 번역하는 동안 문자열의 URL을 무시하여 이러한 경우를 방지합니다.
{
"text": "this is a puppy https://shorturl.at/lvPY5"
}
...translating to german
{
"text": "das ist ein welpe https://shorturl.at/lvPY5"
}
git clone https://github.com/mololab/json-translator.git
yarn
마법 표시 :
CLI 업데이트
src/cli/cli.ts 파일로 이동하십시오
번역 업데이트
파일 src/modules/functions.ts 로 이동하십시오
JSON 작업 업데이트 (Deep Dive, 번역 요청 보내기)
파일 src/core/json_object.ts 로 이동하십시오
JSON 파일 업데이트 작업 읽기/쓰기 작업
파일 src/core/json_file.ts 로 이동하십시오
번역 값 무시 업데이트 (MAP/UNMAP)
파일 src/core/ignorer.ts 로 이동하십시오
CLI를 로컬로 점검하십시오
CLI를 로컬로 점검하려면 npm 사용하여 패키지를 link 해야합니다.
npm link
또는 Make를 사용하여 전체 단계를 실행할 수 있습니다
make run-only-cli
액세스 문제를 방지하기 위해이 명령을 실행하는 동안 터미널에 관리자 액세스 권한이 있는지 확인하십시오.
✔️ 단어를 번역 | 문장
✔️ JSON 객체를 번역합니다
deep json 객체를 번역합니다
JSON 객체에 대한 멀티 언어 번역
✔️ JSON 파일을 번역합니다
deep json 파일을 번역합니다
JSON 파일에 대한 멀티 언어 번역
cli 지원
✔️ 안전한 번역 (정의되지 않은, 길거나 빈 값 점검)
큰 번역에 대한 대기열 지원
✔️ 번역 프로세스에 대해 사용자에게 알리는 (완료된 수, 총 라인 수 등)
✔️ 번역에서 가치 단어를 무시합니다 (예 : 번역에서 무시 {{name}} 또는 {name})
✔️ libre 번역 옵션 (CLI)
✔️ Argos 번역 옵션 (CLI)
✔️ Bing 번역 옵션 (CLI)
주어진 문자열에서 URL 번역을 무시하십시오
언어 및 소스 선택을위한 CLI 옵션
cli에서 출력 파일 이름을 정의합니다 (CLI의 선택적 명령)
✔️ YAML 파일 번역
✔️ 폴백 번역 (실패에 대한 새로운 모듈 시도)
✔️은 동시성 제한을 수동으로 설정할 수 있습니다
libre 번역 옵션 (코드 패키지)
Argos 번역 옵션 (코드 패키지)
Bing 번역 옵션 (코드 패키지)
OpenRouter는 모듈을 번역합니다
Cohere는 모듈을 번역합니다
Manthropic/Claude 번역 모듈
함께 AI는 모듈을 번역합니다
llamacpp는 모듈을 번역합니다
Google Gemini API는 모듈을 번역합니다
Groq 지원 - 새로운 번역 모듈로서 전체 목록
✔️ Chatgpt 지원
동기화 번역
브라우저 지원
자체 libretranslate 인스턴스의 번역 옵션
"-"동적으로 조절할 수 있습니다 (번역되지 않은 자리 표시 자).
@parvineyvazov/json-translator는 MIT 라이센스에 따라 제공됩니다.
위로 돌아갑니다