geojson / geojson-ld

GeoJSON in JSON-LD contexts
Other
130 stars 13 forks source link

How do you localize property attributes? #29

Closed cappelaere closed 9 years ago

cappelaere commented 9 years ago

Just ran into this use-case: I want to return some geojson in Spanish. How do you internationalize the properties attributes? the values are easy... but I do not think that you want to localize the keys. Any ideas on this? Thanks, Pat.

sgillies commented 9 years ago

I don't think localized JSON keys help, but maybe I don't understand. You want to include properties items specific to a language and have software use the appropriate one? Like "title_en" vs "title_fr"?

My gut tells me that it's better to stick to common keys and have the clients translate using the good ole POT/PO way.

cappelaere commented 9 years ago

Let me try again. I want to publish flood maps derived from imagery from various satellites: EO-1, Radarsat-2, Landsat-8, ALOS2… They all have different metadata such as source, sensor, resolution, beam mode,… As we add imagers, clients may be likely to encounter keys they have never seen but still human readable. So I was thinking of doing something like: { “@language”: “es”, “properties": { “resolution”: { “displayName”: “resolución” “@value”: “30m" }, “polarization”: { “displayName”: “polarización" “@value”: “HH" } } }

On Oct 10, 2014, at 4:22 PM, Sean Gillies notifications@github.com wrote:

I don't think localized JSON keys help, but maybe I don't understand. You want to include properties items specific to a language and have software use the appropriate one? Like "title_en" vs "title_fr"?

My gut tells me that it's better to stick to common keys and have the clients translate using the good ole POT/PO way.

— Reply to this email directly or view it on GitHub.

akuckartz commented 9 years ago

@cappelaere @language works a bit differently. See https://github.com/jasnell/w3c-socialwg-activitystreams/issues/21 for a similar issue.

sgillies commented 9 years ago

Let's look to other projects for leadership on this. Space and time are the problems we're solving here.