This package imports ember-i18n translations into an ember project from a csv file. It is meant to be used along with ember-i18n-export package as way to import back translations back into your project once they are translated.
npm install ember-i18n-import
Run the following command from the root of your ember project:
ember-i18n-import --inputFile translations.csv <options>
The csv file containing the translations.
ember-i18n-import --inputFile translations.csv
By default the translation files are generated in the app/locales directory, you can override this by using the outputDir
option:
ember-i18n-import --inputFile translations.csv --outputDir app/translations
By default the translation file generated for each locale is translations.js , you can override this by using the outputFile
option:
ember-i18n-import --inputFile translations.csv --outputFile trans.js
By default the translation key is taken from the SYSTEM_KEY column in the csv file, you can override this by using the translationKeyColumnName
:
ember-i18n-import --inputFile translations.csv --translationKeyColumnName TRANSLATION_KEY
By default each locale values is taken from the matching capitalize locale column in the csv file, you can override this by using the localeColumnNames
option:
ember-i18n-import --inputFile translations.csv --localeColumnNames {\"en\":\"English\",\"fr\":\"French\"}
By default all locales are imported, you can override this by passing comma delimited string of locales to exclude.
ember-i18n-import --inputFile translations.csv --excludedLocales en,fr