Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switchable languages........ #245

Open
MightyPork opened this issue Oct 4, 2017 · 10 comments
Open

switchable languages........ #245

MightyPork opened this issue Oct 4, 2017 · 10 comments

Comments

@MightyPork
Copy link
Member

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

@MightyPork
Copy link
Member Author

MightyPork commented Oct 4, 2017

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

@cpsdqs
Copy link
Collaborator

cpsdqs commented Oct 4, 2017

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?

@MightyPork
Copy link
Member Author

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...

@MightyPork
Copy link
Member Author

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

@cpsdqs
Copy link
Collaborator

cpsdqs commented Oct 4, 2017

well you could do it all from javascript
but then you'd need to have javascript enabled on every page

@MightyPork
Copy link
Member Author

hmmpf

let's maybe not, for now. although japascript is on every page afaik

@cpsdqs
Copy link
Collaborator

cpsdqs commented Oct 4, 2017

well, if you do decide to do this, use the smallest method lest it take up like 100Mb

@MightyPork
Copy link
Member Author

i hope your js translation plan is something more sophisticated than what my router is using

screenshot_20171004_235918

screenshot_20171004_235904

@MightyPork
Copy link
Member Author

they certainly don't give a damn about file size there with keys like this
screenshot_20171005_000128

@cpsdqs
Copy link
Collaborator

cpsdqs commented Oct 4, 2017

before I accidentally express my opinion on that code I'll just answer the question with a ‘yes very much so’ xD

@MightyPork MightyPork added this to the POOL milestone Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants