olab-io / ofSketch

A tool for quickly writing, compiling and running simple openFrameworks applications.
Other
143 stars 11 forks source link

I18n / L10n #68

Open bakercp opened 10 years ago

bakercp commented 10 years ago

Internationalization

Localization

bakercp commented 10 years ago

Some of these might already be finished, but we need to test it.

brannondorsey commented 10 years ago

Basic localization should be working. To add a new language translation copy the localization/lang-en.json file, translate, and save as localization/lang-LANGUAGE_CODE.json (i.e. for french, localization/lang-fr.json).

For now, only basic keywords + buttons in the GUI are being translated because the project is still subject to much change.

bakercp commented 10 years ago

Cooool. How do we choose a language?

brannondorsey commented 10 years ago

With Firefox you simply set your preferred language. With Chrome I have found that setting a preferred language is often overwritten by the version of Chrome that you have ("en-US" by default if you downloaded it in the states). With Safari, best that I can tell, you must download a language specific version of the browser.

brannondorsey commented 10 years ago

opening the javascript console and running navigator.language will tell you the language your browser is set to.

brannondorsey commented 10 years ago

I am planning on adding Spanish and Japanese support soon :)

bakercp commented 10 years ago

Adding German now :)

bakercp commented 10 years ago

Just tested it w/ German and it works well! Of course, that doesn't mean my German is perfect ...

Anyway, we should give folks the change to override the system / browser settings somewhere in the editor. Pulling it from the browser settings is fine for the moment, but I can imagine that some users would prefer to be able to set it manually.

brannondorsey commented 10 years ago

That kind of override is easily supported with the jQuery plug-in that I am using. Lets roll that out when we implement editor/project settings.

bakercp commented 10 years ago

Sounds great.

brannondorsey commented 10 years ago

Basic German, Spanish, and Japanese is currently supported as of v0.2.2.

brannondorsey commented 10 years ago

With regards to internationalization, my knowledge of UTF-8 compatibility is somewhat limited. What is the best way to validate if strings are UTF-8 Compatible in browser + oF? Furthermore, my front-end validation system will probably need to be updated for I18N/L10n, as it currently blocks certain key code presses in input fields, however these key codes will not be the same in other languages.

bakercp commented 10 years ago

I'm moving this to v0.4.0 so we can figure out exactly what we want here and how to implement it.