excelang summary

The excelang tool is a gem that helps with language translations, it does two things:

  1. Reads a given excel document, and outputs xml lanuage files with text nodes.
  2. Reads xml language file(s), and creates an excel file.

This tool relieves a developer from manual xml and excel exporting. Usually a developer creates a site in english and an english.xml file for copy. As soon as the site needs to be localized, you'd use this tool to create an excel sheet from the english.xml file, send it to a producer, then gets sent to a company to localize. When it comes back, you use this tool to create xml from the excel sheet.

It also attempts to correct microsoft word special characters. Every single character cannot be accounted for, but all the common ones are.

excel formats

xls and xlsx.

excel and xml formats

The excelang tool has a required format that must be followed.

Here are the templates:

installation steps

Installation is a fairly painless process - but you will need administration rights.

windows:

  1. Install "Ruby" with this installer. Make sure to "Enable RubyGems" from the "Choose Components" screen during installation.
  2. Download "Console 2", which is a different console application. You should use this instead of the built in windows DOS command prompt
  3. Unzip the console 2 file, and run the "Console.exe" executable.
  4. Add gems.gngrwzrd.com to the gem sources, run this command: gem sources --add http://gems.gngrwzrd.com [ENTER]
  5. Install the spreadsheet gem, run command: gem install spreadsheet [ENTER]
  6. Install the roo gem, run command: gem install roo [ENTER]
  7. Install the excelang gem, run command: gem install excelang [ENTER]

mac:

  1. Ruby and RubyGems are installed by default on mac. Go to next step.
  2. Open a terminal window (/Applications/Utilities/Terminal)
  3. Update RubyGems, run command: sudo gem update --system
  4. Add gems.mccannsf.com to the gem sources, run this command: gem sources --add http://gems.mccannsf.com [ENTER]
  5. Install the spreadsheet gem, run command: sudo gem install spreadsheet [ENTER]
  6. Enter your password
  7. Install the roo gem, run command: sudo gem install roo [ENTER]
  8. Install the hpricot gem, run command: sudo gem install hpricot [ENTER]
  9. Install the excelang gem, run command: sudo gem install excelang [ENTER]

usage

Converting an excel language file into xml:

excelang -i myExcelFile.xls

Converting one or more xml files into an excel language file:

  • one file: excelang -i english.xml
  • *multiple files: excelang -i english.xml,spanish.xml

*With multiple xml files, it creates one excel file that contains all copy.

example

Here's an example zip, it contains files you can test with.