Skip to content

About

Python tool for Excel-to-XLIFF round-trip workflows. Merges source and target spreadsheets into XLIFF 1.2 and injects translations back into the original Excel structure.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Excel 2 Xliff 2 Excel

This is a set of Python tools developed to handle a specific headache: moving translation data between Excel and XLIFF when standard TMS (Translation Management System) workflows break down.

I built this because we had to switch TMS platforms mid-project and couldn't export our progress as XLIFFs. The only thing we had was a partially translated Excel file, so I needed a way to "reconstruct" that into an XLIFF to avoid losing weeks of work.

What it actually does

  • Merged XLIFF Generation: You give it a Source Excel and a Target Excel (with your current translations), and it spits out a merged XLIFF 1.2 file.
  • Hash-based Verification: Every segment gets an MD5 hash of the source text. If the source changes later, the tool knows, preventing you from accidentally injecting translations into the wrong cells.
  • Target Excel Generation: Allows you to generate a finalized Target Excel file by injecting an updated/localized XLIFF back into the original Source Excel structure.
  • Customizable Extraction:
    • Option to ignore hidden cells to avoid translating internal notes or metadata.
    • Option to leave target segments blank if they are identical to the source.

How to use it

To launch the application, run the following command from your terminal:

python main.py

Creating an XLIFF from Excels

  1. Open the tool and select the Source and Target languages.
  2. Configure your settings (Hidden cells and Target string preferences).
  3. Click on Export Excel -> XLIFF.
  4. Select your Source Excel file.
  5. Select your Target Excel (the one containing the translations to be rescued).
  6. Choose a name for your new .xliff file and wait for the process to complete.

Injecting Translations back to Excel

  1. Click on Import XLIFF -> Excel.
  2. Select the Original Source Excel (used to maintain structure and formatting).
  3. Select the localized XLIFF (this must be the one previously generated by the tool or an updated version of it).
  4. Choose a name for your final Target .xlsx..
  5. Wait for the tool to finish the injection process.

Troubleshooting

  • How to add more languages?
    • You can customize the available languages by editing the languages.json file located in the /data folder. Simply add the corresponding ISO language code and language name to the list.

Requirements & Tech

Python 3.11+

Libraries: openpyxl for Excel, lxml for XML/XLIFF parsing, and tkinter for the interface.

About

Python tool for Excel-to-XLIFF round-trip workflows. Merges source and target spreadsheets into XLIFF 1.2 and injects translations back into the original Excel structure.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages