-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
add multilingual capability #100
Comments
A thing to consider, adding a browser language override mechanism as url-param &lang=fr (and a language switcher in html), requires any override value to be included in all links I guess we'll use web locales (en/fr/nl/en-GB/fr-CA), not iso (dut/fre/eng) Consider to let admin set a default language, if requested language is not in available languages There should probably also be localization files for hardcoded strings (and documentation) |
Good points @pvgenuchten. One consideration is that of pygeoapi being integrated into arbitrary Python frameworks. For example, all of pygeoapi (assuming werkzeug) is framework agnostic except for Having said this, implementing i18n in pygeoapi would need some thought w.r.t. being as agnostic as possible. Options:
|
Check out the inspire with wfs3 discussion doc with proposals to add a Lang parameter |
Pingback to related #317 The corollary is that it might be important to consider the degree of equivalence between |
That's not implemented in Starlette yet encode/starlette#279 |
Note language support in OGC API - Features for INSPIRE download services: https://github.com/INSPIRE-MIF/gp-ogc-api-features/blob/master/spec/oapif-inspire-download.md |
I would consider something like having a high level language support in the config file
And then for the dataset maybe implement standard language, and optional ??
Then we could have other system/code/implementation to deal with language translation. Mainly different templates based on language?? I see the point of @francbartoli #100 (comment) and it would be very good to be language agnostic and put things on the side of web framework (better translation tools), but:
|
In config.yml imho there needs to be 3 aspects related to multilingual:
My previous comments was mostly related to point 3. Another option for point 3 would be to use the json-ld context file, which can indicate the language used in a field. |
@pvgenuchten I’m not totally convinced of the support we are talking about. |
Totally agree we should adopt anything indicated by the standard, but the group also gets inspired by existing implementations, if we move a bit ahead of the group and show something is working well... It's good to have this issue as a general discussion, but we probably need separate issues with concrete tasks, such as:
|
A nice i18n blog with babel is a flask plugin, so probably not generic enough for pygeoapi, but the blog describes a nice way to match the language accept header against any of the available languages def get_locale(): |
Initial implementation in #664 now in master. |
Has there been any work on multilingual templates (i.e. landing_page.html)? |
This is pending in #725. |
Following on from opengeospatial/ogcapi-features#134, add capability to support multiple languages:
Accept-Language
Content-Language
hreflang
in links in configThe text was updated successfully, but these errors were encountered: