GitHunt
LD

Ldouziech/csv-to-strings

A simple tool to convert a CSV file to a .strings localization file usable by Xcode for iOS / macOS development

Build npm GitHub stars License

CSV to Strings

This simple tool written with TypeScript converts a CSV file of the following format:

category,base,translation
Category 1,Hello,Bonjour
Category 2,Settings,Réglages
Category 1,Thanks,Merci

Into a .strings file of the following format:

/* Category 1 */
"Hello" = "Bonjour";
"Thanks" = "Merci";

/* Category 2 */
"Settings" = "Réglages";

Install

yarn global add csv-to-strings

OR

npm install --global csv-to-strings

Then, run the tool

csv-to-strings --in <path to csv file> (--out <path to strings file>)

The --in parameter is required, while --out is not and defaults to <path of in file>/translations.strings

Languages

TypeScript80.2%JavaScript19.8%

Contributors

MIT License
Created March 13, 2020
Updated March 13, 2020
Ldouziech/csv-to-strings | GitHunt