OpenDirective / brian

Easy communication and media access for people with cognitive access requirements
http://opendirective.github.io/brian
MIT License
8 stars 3 forks source link

Add ability to localise screen text #76

Open SteveALee opened 8 years ago

SteveALee commented 8 years ago

Will provide a file providingEnglish and Swedish versions. Other files for other languages and a way to select which local in Assist (or perhaps an admin page)

SteveALee commented 8 years ago

Need to support RTL and possibly BiDi too.

Given layout is not particularly text oriented this might be relatively easy

SteveALee commented 8 years ago

The most effective way will be to used text IDs to identify the string and provide a file for each language that maps the ID to the localised text.

Initially I thought having each file map from the English screen to other language would make it easier for translators but then any change to English would break all translations. That's a "no" then. Except that's the approach the standard GNU gettext uses (PO and POT files) but it automatically generates the files and marks updates

IDs could be of the form

ID_<screen>_[<function>|<identifier>] for example ID_ALBUMTREE_TITLE or ID_ANY_HOMEBUTTON