Topic: Exporting translations to Excel compatible format
Topic type:
Kete 1.3 provides the ability to export a translation to an Excel compatible format.
Exporting to Excel compatible format
Kete 1.3 provides the ability to export a translation to an Excel compatible format (a specially crafted XML document that Microsoft Excel 2003/2007 and OpenOffice 3 can read and write to).
Note: In the case below, I demo exporting a Chinese translation (zh). If you want a different translation, then change 'zh' to the appropriate two letter country code.
To get started, make your translation file. You don't need to translate it all, just needs a copy of the english file, with an altered language key at the top. There is a rake task that does this. Run:
$ rake translate:create LOCALE_CODE=zh LOCALE_NAME=Chinese
Then you're good to go. Run the following rake task to export the translation.
$ rake
translate
:excel_2003:export LOCALE=zh
The new exported translation will then be available in tmp/zh.xml
Importing from Excel compatible format
There is a corresponding rake task for importing from Excel data (that has been exported to XML):
$ rake
translate
:excel_2003:import LOCALE=zh FILE_PATH=/path/to/excel-exported-xml-file
Discuss This Topic
There are 4 comments in this discussion.
Read and join this discussion
Just off the top of my head it looks like perhaps the documentation for the feature is wrong about the name of the environmental variable. Try this:
rake translate:create LOCALE_CODE=ar
You can, of course, also check the code to verify it. If this fixes the problem, please use the "edit" link on the particular piece of documentation to update it with the correct rake call.
Cheers,
Walter
Tags: Arabic
the error changed to be
LOCALE_NAME (translated translation name) is not set. Please set one before running the rake task
Tags: Arabic
Kieran P
said Re: LOCALE_CODE
Hey Ahmad,
The example in the topic above is a little out of date. I've gone ahead and updated it. The new syntax is:
rake translate:create LOCALE_CODE=ar LOCALE_NAME=Arabic
Where LOCALE_CODE is a two letter country code, and needs to be unique (check no other translation with it exists).
LOCALE_NAME is what others on the site will see in the language choosing dropdown box, so in your case, probably Arabic, though you can use the native name for it, i.e. "العربية", or a combination of both, e.g. "(Arabic) العربية"
Regards
Kieran
Tags: Arabic
Ahmad Maher
said LOCALE_CODE
hello ,
this error appears when run this command
rake translate:create LOCALE=ar
LOCALE_CODE (two letter country code) is not set. Please set one before running the rake task
Tags: Arabic