Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Read google spreadsheet and generate translation files out of it

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test adding support for apple strings file format
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Rakefile
Octocat-spinner-32 urbane.gemspec


Read a google spreadsheet and generate translation files into a target directory as JSON files. It uses the googles JSON api as opposed to the XML api. That means that one has to publish the doc in order to get the spreadsheet id. At some point, it makes sense to use the more powerfull XML API using credentials to load the spreadsheet.


gem install urbane


require 'urbane'

spreadsheet_id = '0Amfbd9df0sdflkewsd09dsfkl328sdf02'
target_dir = '/tmp/translations'
file_name = 'text_ids.json'

# the keys define the column headers in the spreadsheet
# the values define the name of the folder for a given language
languages = {
  :english => 'en',
  :german => 'de',
  :french => 'fr',
  :italian => 'it',
  :turkish => 'tr',
  :spanish => 'es',
  :portuguese => 'pt'
  :spreadsheet_id => spreadsheet_id,
  :target_dir => target_dir,
:format => :json,
  :file_name => file_name,
  :languages => languages,
  :fallback_language => :english

Output format

Support for YAML, JSON, XML and Apple Strings Files

VALID_FORMATS = [:json, :yaml, :xml, :apple_strings]

Output structure

    - en
        - text_ids.json
    - fr
        - text_ids.json


A google spreadsheet

For now it needs to have a certain format. Check the demo document. You have several sheets in one document

A google spreadsheet id

  1. Create a spreadsheet on google docs
  2. Click on File -> Publish To The Web
  3. Check 'Automatically republish when changes are made'
  4. Find the spreadsheet id in the generated link. It is marked with 'key='. In the following url, the key would be '0Auo5c2PWMqR4dHlOSjlXcjY0X01udzNPdHlKZ09QTVE':
  5. Click on the close button
Something went wrong with that request. Please try again.