lingo.dev
Open-source localization engineering tools. Connects to Lingo.dev localization engineering platform for consistent, quality translations.
- 5.4k
- TypeScript
- Apache-2.0
- 2 d ago
The maintainer has not written a description at the source.
Repo lingodotdev/sdk-ruby, read from GitHub 1 min ago. lingodotdev has not joined Take My Repo.
lingodotdev/sdk-ruby is a public repo on GitHub by lingodotdev. It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it. It is written mainly in Ruby, has 1 stars and last changed on 2026-03-07. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
A Ruby SDK for integrating with the Lingo.dev localization and translation API. Localize text, objects, and chat messages with support for batch operations, progress tracking, and concurrent processing.
The Lingo.dev Ruby SDK provides a simple and powerful interface for localizing content in your Ruby applications. It supports:
Add this line to your application's Gemfile:
gem 'lingodotdev'
And then execute:
bundle install
Or install it yourself with:
gem install lingodotdev
require 'lingodotdev' # Create an engine instance engine = LingoDotDev::Engine.new(api_key: 'your-api-key', engine_id: 'your-engine-id') # Localize text result = engine.localize_text('Hello world', target_locale: 'es', source_locale: 'en') puts result # => "Hola mundo"
Localize a simple string to a target locale:
engine = LingoDotDev::Engine.new(api_key: 'your-api-key', engine_id: 'your-engine-id') result = engine.localize_text( 'Hello world', target_locale: 'es', source_locale: 'en' ) # => "Hola mundo"
Localize all string values in a Hash:
data = { greeting: 'Hello', farewell: 'Goodbye', message: 'Welcome to our app' } result = engine.localize_object(data, target_locale: 'es', source_locale: 'en') # => { # greeting: "Hola", # farewell: "Adiós", # message: "Bienvenido a nuestra aplicación" # }
Localize chat conversations while preserving structure:
chat = [ { name: 'user', text: 'Hello!' }, { name: 'assistant', text: 'Hi there! How can I help you?' }, { name: 'user', text: 'I need some information.' } ] result = engine.localize_chat(chat, target_locale: 'ja', source_locale: 'en') # => [ # { name: 'user', text: 'こんにちは!' }, # { name: 'assistant', text: 'こんにちは!どのようにお手伝いできますか?' }, # { name: 'user', text: '情報が必要です。' } # ]
Localize HTML documents while preserving structure and formatting:
html = <<~HTML <html> <head> <title>Welcome</title> <meta name="description" content="Page description"> </head> <body> <h1>Hello World</h1> <p>This is a paragraph with <a href="/test" title="Link title">a link</a>.</p> <img src="/image.jpg" alt="Test image"> <input type="text" placeholder="Enter text"> </body> </html> HTML result = engine.localize_html(html, target_locale: 'es', source_locale: 'en') # => HTML with localized text content and attributes, lang="es" attribute updated
The method handles:
meta content, img alt, input placeholder, a titlescript and style tagslang attribute on the html elementLocalize the same content to multiple target locales:
# Batch localize text results = engine.batch_localize_text( 'Hello world', target_locales: ['es', 'fr', 'de'], source_locale: 'en' ) # => ["Hola mundo", "Bonjour le monde", "Hallo Welt"] # With concurrent processing for better performance results = engine.batch_localize_text( 'Hello world', target_locales: ['es', 'fr', 'de', 'ja'], source_locale: 'en', concurrent: true )
Localize multiple objects to the same target locale:
objects = [ { title: 'Welcome', body: 'Hello there' }, { title: 'About', body: 'Learn more about us' }, { title: 'Contact', body: 'Get in touch' } ] results = engine.batch_localize_objects( objects, target_locale: 'es', source_locale: 'en', concurrent: true ) # => [ # { title: "Bienvenido", body: "Hola" }, # { title: "Acerca de", body: "Aprende más sobre nosotros" }, # { title: "Contacto", body: "Ponte en contacto" } # ]
Automatically detect the locale of a given text:
locale = engine.recognize_locale('Bonjour le monde') # => "fr"
Monitor localization progress with callbacks:
# Using a block result = engine.localize_text('Hello world', target_locale: 'es', source_locale: 'en') do |progress| puts "Progress: #{progress}%" end # Using the on_progress parameter callback = proc { |progress| puts "Progress: #{progress}%" } result = engine.localize_text( 'Hello world', target_locale: 'es', source_locale: 'en', on_progress: callback )
Provide existing translations as reference to improve translation accuracy. The reference hash maps locale codes to key-value content objects:
reference = { 'es' => { 'greeting' => 'Hola', 'farewell' => 'Adiós' }, 'fr' => { 'greeting' => 'Bonjour', 'farewell' => 'Au revoir' } } result = engine.localize_text( 'Hello', target_locale: 'ja', source_locale: 'en', reference: reference )
For one-off translations without managing engine instances:
# Quick translate a string result = LingoDotDev::Engine.quick_translate( 'Hello world', api_key: 'your-api-key', engine_id: 'your-engine-id', target_locale: 'es', source_locale: 'en' ) # Quick translate a hash result = LingoDotDev::Engine.quick_translate( { greeting: 'Hello', farewell: 'Goodbye' }, api_key: 'your-api-key', engine_id: 'your-engine-id', target_locale: 'fr', source_locale: 'en' ) # Quick batch translate to multiple locales results = LingoDotDev::Engine.quick_batch_translate( 'Hello', api_key: 'your-api-key', engine_id: 'your-engine-id', target_locales: ['es', 'fr', 'de'], source_locale: 'en' )
Check the authenticated user details:
user = engine.whoami # => { email: "user@example.com", id: "user-id" }
The SDK can be configured when creating an engine instance:
engine = LingoDotDev::Engine.new( api_key: 'your-api-key', # Required: Your Lingo.dev API key engine_id: 'your-engine-id', # Optional: Your engine ID api_url: 'https://api.lingo.dev', # Optional: API endpoint URL batch_size: 25, # Optional: Max items per batch (1-250) ideal_batch_item_size: 250 # Optional: Target word count per batch (1-2500) )
You can also configure using a block:
engine = LingoDotDev::Engine.new(api_key: 'your-api-key', engine_id: 'your-engine-id') do |config| config.batch_size = 50 config.ideal_batch_item_size = 500 end
| Option | Type | Default | Description |
|---|---|---|---|
api_key |
String | Required | Your Lingo.dev API key |
engine_id |
String | nil |
Your engine ID for localization processing |
api_url |
String | https://api.lingo.dev |
API endpoint URL |
batch_size |
Integer | 25 |
Maximum items per batch (1-250) |
ideal_batch_item_size |
Integer | 250 |
Target word count per batch item (1-2500) |
localize_text(text, target_locale:, source_locale:, reference: nil, on_progress: nil, concurrent: false, &block)Localizes a string to the target locale.
text (String): Text to localizetarget_locale (String): Target locale code (e.g., 'es', 'fr', 'ja')source_locale (String): Source locale code (e.g., 'en')reference (Hash, optional): Existing translations keyed by locale code, e.g. { 'es' => { 'key' => 'valor' } }on_progress (Proc, optional): Progress callbackconcurrent (Boolean): Enable concurrent processing&block: Alternative progress callbacklocalize_object(obj, target_locale:, source_locale:, reference: nil, on_progress: nil, concurrent: false, &block)Localizes all string values in a Hash.
localize_text, with obj (Hash) instead of textlocalize_chat(chat, target_locale:, source_locale:, reference: nil, on_progress: nil, concurrent: false, &block)Localizes chat messages. Each message must have :name and :text keys.
localize_text, with chat (Array) instead of textlocalize_html(html, target_locale:, source_locale:, reference: nil, on_progress: nil, concurrent: false, &block)Localizes an HTML document while preserving structure and formatting. Handles both text content and localizable attributes (alt, title, placeholder, meta content).
html (String): HTML document string to localizetarget_locale (String): Target locale code (e.g., 'es', 'fr', 'ja')source_locale (String): Source locale code (e.g., 'en')reference (Hash, optional): Existing translations keyed by locale code, e.g. { 'es' => { 'key' => 'valor' } }on_progress (Proc, optional): Progress callbackconcurrent (Boolean): Enable concurrent processing&block: Alternative progress callbacklang attributebatch_localize_text(text, target_locales:, source_locale:, reference: nil, concurrent: false)Localizes text to multiple target locales.
text (String): Text to localizetarget_locales (Array): Array of target locale codeslocalize_textbatch_localize_objects(objects, target_locale:, source_locale:, reference: nil, concurrent: false)Localizes multiple objects to the same target locale.
objects (Array): Array of Hash objectstarget_locale (String): Target locale codelocalize_objectrecognize_locale(text)Detects the locale of the given text.
text (String): Text to analyzewhoamiReturns information about the authenticated user.
:email and :id keys, or nil if authentication failsEngine.quick_translate(content, api_key:, engine_id: nil, target_locale:, source_locale:, api_url: 'https://api.lingo.dev')One-off translation without managing engine lifecycle.
content (String or Hash): Content to translateEngine.quick_batch_translate(content, api_key:, engine_id: nil, target_locales:, source_locale:, api_url: 'https://api.lingo.dev')One-off batch translation to multiple locales.
content (String or Hash): Content to translatetarget_locales (Array): Array of target locale codesThe SDK defines custom exception classes for different error scenarios:
begin engine = LingoDotDev::Engine.new(api_key: 'your-api-key') result = engine.localize_text('Hello', target_locale: 'es', source_locale: 'en') rescue LingoDotDev::ValidationError => e # Invalid input or configuration puts "Validation error: #{e.message}" rescue LingoDotDev::AuthenticationError => e # Invalid API key or authentication failure puts "Authentication error: #{e.message}" rescue LingoDotDev::ServerError => e # Server-side error (5xx) puts "Server error: #{e.message}" rescue LingoDotDev::APIError => e # General API error puts "API error: #{e.message}" rescue LingoDotDev::Error => e # Base error class for all SDK errors puts "Error: #{e.message}" end
LingoDotDev::Error (base class)
LingoDotDev::ArgumentError
LingoDotDev::ValidationError - Invalid input or configurationLingoDotDev::APIError - API request errors
LingoDotDev::AuthenticationError - Authentication failuresLingoDotDev::ServerError - Server-side errors (5xx)After checking out the repository, run bin/setup to install dependencies.
To run the test suite:
# Set your API key export LINGODOTDEV_API_KEY='your-api-key' # Run tests bundle exec rspec
You can also run bin/console for an interactive prompt to experiment with the SDK.
To install this gem onto your local machine, run:
bundle exec rake installjson ~> 2.0nokogiri ~> 1.0See the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
lingodotdev/sdk-ruby is a public repo on GitHub by lingodotdev. Its maker has not written a description.
It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-03-07. GitHub counts 0 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.

Open-source localization engineering tools. Connects to Lingo.dev localization engineering platform for consistent, quality translations.