-
Notifications
You must be signed in to change notification settings - Fork 56
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
internationalization #13
Comments
Also, loading of the proper translated flavor of the site depending on user's settings would be awesome, but this is probably impossible with a static website. is it really ? |
See https://www.flag-sprites.com/ for free flags with css code ready |
with a small javascript snippet it should be possible to redirect to the user's language specific version of the page (more or less like simone does for yunohost doc ?) |
See https:/yunohost/yunohost-admin/blob/unstable/src%2Fjs%2Fyunohost%2Fmain.js#L111-L119 redirect in js with : document.location.href = "https://tonporn.com" |
Jinja has a gettext extension : http://jinja.pocoo.org/docs/dev/extensions/#i18n-extension I made an attempt with stuff like :
but I fear this will become complex to handle all the different text attributes of individual sections which all have a different data model (e.g. full-picture and text). |
Regarding flags: I've been taugh that using flag is apparently bad for i18n and that language name or short name should be used instead. |
An experiment i'm relatively happy with : https://gist.github.com/julienmalik/e6544ad26e82bae4381c |
beginning of a solution here : https:/julienmalik/prosopopee/tree/internationalization
in the root settings.yaml to be multilingual the gallery .yaml then needs to be like :
but the monolingual case is still supported as before. multi langages are supported only for title, subtitle and text keys. |
I need to make prosopopee multilingual.
Probably it is not so much work and modifications, so i'd like to implement it.
Opening this issue in the hope to get feedback first (so that it has a chance to get merged upstream in the future).
My initial thoughts:
Any title/subtitle/text could have :
like :
The list of translations might need to be referenced from the main settings.
Then for each page we render the different flavors :
and in all headers, we put a small widget with flags to switch between languages (ideas welcome for that, i'm far from fluent in html/css/js).
The text was updated successfully, but these errors were encountered: