Skip to content

naskio/po-auto-translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

po-auto-translation

Process to translate PO files automatically for FREE using Google Translate, the script is written using JavaScript

Requirements

  • Node.js (10+)

Steps

  1. Clone this repository

    git clone [email protected]:naskio/po-auto-translation.git
  2. Install dependencies

    yarn install 
    # or
    npm install
  3. Convert your PO file into CSV using the following command

    node index.js untranslated_XX.po > untranslated_XX.csv
  4. Upload untranslated_XX.csv to Google Sheet

  5. Use the formula

    =GOOGLETRANSLATE(A2;"en";"ar")
    
  6. Convert the translated columns to text using Copy the column then paste values only

  7. Export file to CSV translated_XX.csv (download CSV)

  8. Convert the CSV file to PO file using the following command

    node index.js untranslated_XX.po translated_XX.csv > translated_XX.po