Installation
Add the gem, create a config file, and point it at your LLM provider.
Add the gem#
In your app's Gemfile.
locallingo is a development-time tool — it never runs in production — so put it in the :development group. It pulls in RubyLLM as its provider client.
group :development do
gem "locallingo"
endThen bundle install.
Generate the binstub#
The gem installs an executable called lingo. Generate a binstub so you can run it via bin/lingo inside your app's bundle:
bundle binstubs locallingoProvider credentials#
locallingo never stores API keys. RubyLLM reads them from the environment based on the provider you configure — for example OPENAI_API_KEY for OpenAI or ANTHROPIC_API_KEY for Anthropic.
OPENAI_API_KEY=sk-...Create the config file#
Add a .locallingo.yml at your app root. The smallest useful config names your source and target locales; every other key has a sensible default (see the Configuration reference).
defaults:
source_locale: en
target_locales: [de, sv]
provider: openai
translate:
model: gpt-5-mini
quality:
model: gpt-4o-mini
context: "Acme, a business application"
glossary:
entity: "business/company account holder"That's it — head to the Quick start.