wesleytodd / YeoPress

A Yeoman generator for WordPress
Other
1.08k stars 163 forks source link

Translate the generator prompts #86

Open wesleytodd opened 10 years ago

wesleytodd commented 10 years ago

I would love to support translated prompts to make the generator more accessible internationally. If anyone is interested in providing translations, or in helping to build the feature, please respond below.

felixzapata commented 10 years ago

Which would be the best option for the user to use the generator in your own language? Maybe a first question about your language and then the prompts would appear translated? But with this option it´s the same problem... at least one question is made in a default language....

Maybe a flag with the generator that when user execute it, the prompts appear translated? (I don´t remember if a generator can receive parameters)

wesleytodd commented 10 years ago

I think that a flag is the best route, --locale=en_GB or -l en_GB was my plan for this. I may also look at getting the language information from the operating system to choose a correct default.

felixzapata commented 10 years ago

ok, for the moment the prompts translations we publish here?

wesleytodd commented 10 years ago

The best would be a json file with the english string as the key and the translation as the value, ex:

{
    "WordPress Version": "Versión WordPress"
}

ps. sorry if that translation is wrong....google translate is only so useful.

whenrique commented 9 years ago

+1

wesleytodd commented 9 years ago

Anyone who wants this can easily add it. Just require in the translations file for the proper language and have that be an object of key to translated value. And pass that in place of the hard coded strings.

I would merge that right away if anyone too the time to do it. Even one language would be all it would take to start, then people could come along and add new translations just by copying the json files.