arb_translate는 Google Gemini 또는 OpenAI ChatGPT의 AI 모델을 사용하여 ARB(App Resource Bundle) 파일에서 누락된 번역을 자동으로 생성하는 명령줄 도구입니다. LeanCode에서 개발되었으며 기존 문자열을 기반으로 정확한 번역을 제안함으로써 로컬라이제이션 워크플로우를 간소화하고 수작업을 줄여줍니다. 이 도구는 Android, iOS, macOS, Windows 및 Linux를 포함한 여러 플랫폼에서 Flutter 프로젝트에 원활하게 통합될 수 있습니다. 실시간 번역과 배치 처리를 모두 지원하므로 다국어 앱 콘텐츠를 효율적으로 관리하는 팀에게 이상적입니다.
사용 사례
누락된 번역 생성 자동화
국제화 워크플로우 간소화
수동 번역 작업 감소
다국어 플러터 앱 지원
AI 기반 번역을 CI/CD 파이프라인에 통합하기
주요 기능
Google Gemini 또는 OpenAI를 통한 AI 기반 번역
자동화를 위한 명령줄 인터페이스
ARB 파일 형식을 지원합니다
크로스 플랫폼 호환성
번역 키의 배치 처리
Flutter 프로젝트와의 간편한 통합
적합한 대상
다중 언어를 관리하는 플러터 개발자
로컬라이제이션에 ARB를 사용하는 팀
빠른 번역 반복이 필요한 프로젝트
로컬라이제이션 필요가 있는 CI/CD 파이프라인
AI 보조 번역 도구를 찾는 개발자
고려 사항
Google Gemini 또는 OpenAI의 API 접근 권한이 필요합니다
AI 호출에 인터넷 연결에 따라 달라집니다
대량 사용에 대한 잠재적 비용
번역 품질은 프롬프트 정확도에 달려 있습니다
인간 검토의 대체가 아님
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
arb_translate
A command-line tool for automatically generating missing translations to ARB
files using Google Gemini or OpenAI ChatGPT by
LeanCode
Installation
$ dart pub global activate arb_translate
Configuration
arb_translate has been designed to seamlessly integrate with Flutter apps
using flutter_localizations for code generation from ARB files. Thanks to this
integration, the setup process for arb_translate can be completed in just a few
steps:
Generate your API key. You can create your Gemini key
here or your OpenAI key
here
Save your API token in the environment variable ARB_TRANSLATE_API_KEY or
add arb-translate-api-key: {your-api-key} to l10n.yaml in your project.
(Optional) Select model used for translation. To do it add
arb-translate-model to l10n.yaml or use command argument --model. The default model is
gemini-2.5-flash. For all available models see arb_translate --help.
(Optional) Add context of your application
arb-translate-context: {your-app-context} eg. "sporting goods store app"
All other required parameters match flutter_localizations parameters and will
be read from l10n.yaml file. You can override them using command arguments if
necessary. See arb_translate --help for more information.
Configuration without l10n.yaml
If you project doesn't include l10n.yaml configuration you have to provide
configuration using environment variables and command arguments. You also have
to provide:
--arb-dir The directory where the template and translated ARB files are
located
--template-arb-file The template ARB file that will be used as the basis
for translation
See arb_translate --help for more information.
Custom model configuration
You can use arb_translate with any model with an OpenAI-compatible API. To configure a custom model:
Add arb-translate-custom-model: {your-model-name} to l10n.yaml or specify
as command argument custom-model: {your-model-name}
Add arb-translate-custom-model-provider-base-url: {your-model-url} to
l10n.yaml or specify as command argument: --custom-model-provider-base-url: {your-model-url}
(Optional) Set target batch size appropriately to model token count limits by
adding arb-translate-batch-size: {size} to your l10n.yaml or specify as
command argument batch-size: {size}. Batch size is the number of characters
of ARB messages in a single batch and does not include the prompt or app
context.
Usage
To generate translations, simply call arb_translate. All messages included in
the template ARB file but missing from other files will be translated. To add a
new locale, simply add an empty ARB file.
$ arb_translate
Or without l10n.yaml file
$ arb_translate --arb-dir...
Read more
If you want to know how we made this tool and what challenges we had,
read the story.