The project is in a healthy, maintained state
Generates localization files from spreadsheets using the localio gem. Supports Google Drive, XLS, XLSX, and CSV sources with output for Android, iOS, Swift, Rails, JSON, Java Properties, RESX, and Twine.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 2.0
>= 0
>= 0
>= 0

Runtime

>= 0.2
 Project Readme

fastlane-plugin-localio

License Gem Version

Fastlane plugin for the localio gem. Generates localization files from spreadsheets (Google Drive, XLS, XLSX, CSV) for multiple platforms (Android, iOS, Swift, Rails, JSON, Java Properties, RESX, Twine).

Installation

Add to your project's Gemfile:

gem "fastlane-plugin-localio"

Or install via fastlane:

fastlane add_plugin localio

Usage

The plugin supports two modes of operation.

Mode 1: Locfile-based (simple)

If you already have a Locfile configured for localio, just point to it:

localio(locfile: "path/to/Locfile")

Mode 2: Inline parameters

Configure everything directly in your Fastfile without needing a separate Locfile:

localio(
  platform: "android",
  source: "xlsx",
  source_path: "translations.xlsx",
  source_sheet: "Sheet1",
  output_path: "app/src/main/res",
  formatting: "smart"
)

Source types

XLSX

localio(
  platform: "android",
  source: "xlsx",
  source_path: "translations.xlsx",
  source_sheet: "Sheet1",
  output_path: "app/src/main/res"
)

XLS

localio(
  platform: "ios",
  source: "xls",
  source_path: "translations.xls",
  source_sheet: "Translations",
  output_path: "Resources"
)

CSV

localio(
  platform: "json",
  source: "csv",
  source_path: "translations.csv",
  output_path: "locales",
  source_options: { column_separator: ";" }
)

Google Drive

localio(
  platform: "android",
  source: "google_drive",
  source_path: "My Translations Spreadsheet",
  source_sheet: "Sheet1",
  source_options: {
    client_id: "your_client_id",
    client_secret: "your_client_secret",
    client_token: "path/to/token.json"
  },
  output_path: "app/src/main/res"
)

Platforms

Platform Key Description
Android android Generates strings.xml resource files
iOS ios Generates .strings files
Swift swift Generates Swift constants
Rails rails Generates YAML locale files
JSON json Generates JSON locale files
Java Properties java_properties Generates .properties files
RESX resx Generates .resx resource files
Twine twine Generates Twine format files

Platform options

Pass platform-specific options via the platform_options parameter:

localio(
  platform: "swift",
  source: "xlsx",
  source_path: "translations.xlsx",
  output_path: "Generated",
  platform_options: {
    create_constants: false,
    override_default: "es"
  }
)

Formatting

Control how translation keys are formatted:

Style Key
Smart (default) smart
Snake Case snake_case
Camel Case camel_case
None none
localio(
  platform: "android",
  source: "xlsx",
  source_path: "translations.xlsx",
  output_path: "res",
  formatting: "camel_case"
)

Filtering

Use only and except to filter which keys are processed:

localio(
  platform: "android",
  source: "xlsx",
  source_path: "translations.xlsx",
  output_path: "res",
  only: '[\[][a][\]]',
  except: '[\[][b][\]]'
)

Parameters

Key Description Default
locfile Path to an existing Locfile
platform Target platform
source Source type (google_drive, xls, xlsx, csv)
source_path Path to source file or spreadsheet title
source_sheet Sheet name or index
source_options Additional source options hash
output_path Output directory
formatting Key formatting style smart
platform_options Additional platform options hash
only Regex filter to include only matching keys
except Regex filter to exclude matching keys

License

MIT. See LICENSE.