slang_gpt
0.11.4, released 8 months ago by tienisto.com
Use GPT to automatically translate slang localization files at compile time.
What it does
Automates the localization of slang translation files using OpenAI's GPT models at compile time. It supports context-aware translations, partial updates by default, handling max input lengths, and translating specific target locales or groups.
AI-written summary of version 0.11.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are already using the slang package for localization.
- You want context-aware AI translations for your app's localization files at compile time.
- You need to translate missing keys to new target languages automatically using OpenAI.
Skip it when
- You are not using the slang localization package.
- You prefer traditional translation tools or manual localization over AI.
- You require an offline-only or non-OpenAI translation workflow.
Strengths
- Provides context-aware translations compared to traditional tools like Google Translate.
- Supports partial translation to only translate missing keys and save costs.
- Configurable model parameters, max input lengths, and excludes.
- Allows ignoring specific keys using the ignoreGpt modifier.
Weaknesses
- Currently only supports the OpenAI API.
- Relies on external API calls and token costs during compile time.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Add slang to dependencies and slang_gpt to dev_dependencies. Configure gpt settings in build.yaml or slang.yaml, and run via the command line with an API key.
gpt:
model: gpt-4
description: |
"River Adventure" is a game where you need to cross a river by jumping on stones.Alternatives
Packages that do the same job and could replace slang_gpt.
- auto_translator
A CLI tool to translate ARB files using Google Cloud Translate and DeepL.
47Compare - arb_translate
CLI tool to automatically generate missing translations for ARB files using AI models.
46Compare
Works with
Packages commonly used together with slang_gpt: ones it builds on, ones built on it, and its own family.