po-auto-translation
po-auto-translation copied to clipboard
translate PO files automatically for FREE using google translate
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
-
Clone this repository
git clone [email protected]:naskio/po-auto-translation.git -
Install dependencies
yarn install # or npm install -
Convert your PO file into CSV using the following command
node index.js untranslated_XX.po > untranslated_XX.csv -
Upload
untranslated_XX.csvto Google Sheet -
Use the formula
=GOOGLETRANSLATE(A2;"en";"ar") -
Convert the translated columns to text using
Copy the column then paste values only -
Export file to CSV
translated_XX.csv(download CSV) -
Convert the CSV file to PO file using the following command
node index.js untranslated_XX.po translated_XX.csv > translated_XX.po