Koa11y
Koa11y copied to clipboard
Add I18n support
Setup the ability to switch languages and let people contribute translations.
see: scout-app.io
Hi, I am a freelance translator since 11 years old. I have already translated an app in 9 languages and revised more than other 3 languages (Georgian and Greek).
I use Angular, PHP and JSON to translate quickly the sites into 9 languages and still studying Georgian and Greek to translate. I have already built my client's site in PHP and translated quickly, using PHP, into 9 languages.
@gusbemacbe
I've set up a Google Sheet for translation. I may still need to add some keys/text to it for translation. But it's a start.
- https://docs.google.com/spreadsheets/d/1JeQuEyA4hFLI3sk3-heG-cG5eomFBUD5Co4i6H6YEAs/edit?usp=sharing
Work that needs to be done for this feature:
- Update all strings and add any new keywords to the Google Sheet.
- Google translate all keys for at least one language so we can test switching between English and it. Feel free to steal any relevant translations from Scout-App.
- Create a
cultures.js
Node script that automates downloading a CSV version of the Google Sheet and converts it over to the JSON dictionary the app needs. (See Scout-App's cultures.js). - Add the above script to the
package.json
scripts section ascultures
. So we can just runnpm run cultures
to update the dictionary file with the latest translations. - Update the
dictionary.json
using the automated script to have at least two translations. - Implement the
vue-i18n
library and hook up the dictionary. See this example. - Replace all strings of text with their keywords using
vue-i18n
.
We could use Transifex or another service and provide po/pot files.
@DanielRuf
I've looked into them (and others) previously. It's a good system, however the process to get open source status took too much effort and ultimately it just adds hurdles in the way of people that would volunteer to translate. Scout-App has been translated to 26 languages and I think it's because of the ease of access to being able to just do the translations in Google Sheets with as few barriers to entry as possible.
The downside is that each language only has one version of a string, meaning the translator has to make decisions about edge cases in their language. But I've never gotten any complaints about that before.
For now, I'd prefer to just use Google Sheets and a Node script to automate machine translations and converting to usable JSON for vue-i18n
.
True. Is there a translation template which can be used?