Open csarven opened 6 years ago
I think we should extract text from UI to separate files like .po(Portable Object File) does in other frameworks(Wordpress, Druapl,Django), we can use one json file for one language and keep config.js (or i18n.js) simple.
Depending on the
DO.C.Lang
value, apply the language for all human-readable content eg. menus, common items that go into the document.This requires all human-readable content to be moved into something like
DO.C.Text
(set insrc/config.js
or maybe even better set insrc/i18n.js
and imported insrc/config.js
) eg:Usage:
DO.C.Text.SignIn[DO.C.Lang]
On DOMContentLoaded, to set
DO.C.Lang
, follow this order:document.documentElement.lang
if seten
When user signs in, check their profile for preferred language, and if known, update
DO.C.Lang
.Provide controls to change the language (probably from the dokieli menu).