-
Notifications
You must be signed in to change notification settings - Fork 10
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
support multiple languages #14
Comments
Just to make sure, this is about (auto-)translating the meal data? (In addition to providing a localized openmensa app) For exposing this to the API, why a format-dependent JSON-LD transport instead of |
Yes
I just thought about scenario when single response contains data in many/all available languages, not just a single one. Do you have links to some real world examples of canteen data available in more than single language? |
I'm currently working on a parser for a canteen that outputs german and english meal descriptions along. (Since as you mentioned some canteens known the fact of more people moving around the globe, too.) |
[
{
"id": 1419706,
"name": "Drillinge aus dem Backofen mit Meersalz und drei verschiedenen Saucen (2)",
"category": "Mittagsmenü",
"prices": {
"students": null,
"employees": null,
"pupils": null,
"others": null
},
"notes": [
"(2) Milch"
]
}
] with JSON-LD one would do something in lines {
"id": 1419706,
"name": {
"de": "Drillinge aus dem Backofen mit Meersalz und drei verschiedenen Saucen (2)",
"en": "Ovenpotatoes with seasalt and 3 sauces (2)"
},
"category": {
"de": "Mittagsmenü",
"en": "Lunch menu"
},
"prices": {
"students": null,
"employees": null,
"pupils": null,
"others": null
},
"notes": [
{ "de": "(2) Milch", "en": "(2) Milk" }
]
} where for cases like Milk, linking to wikidata could make a lot of sense: https://www.wikidata.org/wiki/Q8495 |
Changes to JSON-LD would be a major API break. Therefore it would require a API v3. In addition I miss in this example which language are native provided by the parser and which are translated. Before we can auto-translate stuff we have to prepare the backend to handle/store menu information in multiple languages and extent the feed to allow parsers to provided meal information within multiple languages. This is on the road map but it will take some time until I find time to do it. |
Some canteens must already provide information in multiple languages. With increasing number of people moving around the globe more freely, supporting multiple languages sounds like a natural evolution.
Interesting tool used by frontend web apps, which uses Wikidata as source for food names
http://googleknowledge.github.io/qlabel/demo/menu/
Since I work with linked data, I find it offering some helpful ways to manage multilingual content. From API perspective and recognizing JSON becoming most popular serialization in world of web APIs, this feature of JSON-LD looks very helpful - http://www.w3.org/TR/json-ld/#string-internationalization
The text was updated successfully, but these errors were encountered: