1.4.1 • Published 5 years ago

csv-to-strings v1.4.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

Build npm GitHub stars License

CSV to Strings (and XML)

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 an Xcode .strings localization file of the following format:

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

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

Or into an .xml file for Android:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!--Category 1-->
    <string name="Hello">Bonjour</string>
    <string name="Thanks">Merci</string>

    <!--Category 2-->
    <string name="Settings">Réglages</string>
</resources>

Install

yarn global add csv-to-strings

OR

npm install --global csv-to-strings

Then, run the tool

csv-to-strings --platform <ios or android> --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

1.4.1

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago