Open MightyPork opened 7 years ago
presumably the active language could be defined in a similar way to _demo
or _root
.
this won't work for the help page, so we must ensure there are no tr() uses - but i think the only js there atm is building the (still very ugly) color preview
the webpack loader can easily load multiple languages—I have no idea about the PHP though. Maybe the server could perform substitutions instead of having a bunch of duplicate data?
it could. i'm not sure that's worth it, as it'd require exporting the constants to C and building some horrible look-up table with an x-macro. it could be really slow...
oh, and the help page is pre-gzipped, so we can't do any replacements on that (i.e. the menu) which .. uhhhhhh is a problem. might need to figure out some js hack with a get parameter
well you could do it all from javascript but then you'd need to have javascript enabled on every page
hmmpf
let's maybe not, for now. although japascript is on every page afaik
well, if you do decide to do this, use the smallest method lest it take up like 100Mb
i hope your js translation plan is something more sophisticated than what my router is using
they certainly don't give a damn about file size there with keys like this
before I accidentally express my opinion on that code I'll just answer the question with a ‘yes very much so’ xD
if we exclude the help page, that's like 35 kB uncompressed per language, not a huge deal - we just must figure out how to have multiple languages in js