Wikivoyage:RDF Expedition/Language

The goal here is to define what language or languages are spoken at a destination. The data could be used to add a phrasebook automatically to the "related articles" section of the navigation area.



At the RDF level, there doesn't seem to be a standard way to say "this language is spoken at this place." So we'd need to add it to our local schema -- something like wts:languageSpoken. We can use standard RFC 3066 identifiers for languages ("en", "fr", "pt-BR").

That way we could say:

 place:Brazil wts:languageSpoken "pt-BR" .

 place:Switzerland wts:languageSpoken "fr", "de", "it", "rm" .

For most countries, this would only need to be defined at the country level. However, for regions that use different languages from the country they're in, we could add a language code at the region level, too.

 place:Catalonia wts:languageSpoken "ca", "es" .

 place:Brittany wts:languageSpoken "br", "fr" .

To save ourselves some work, we can assume that the language spoken in a place is either a) the language defined for that place or b) the first language(s) defined up the isIn hierarchy. To avoid having any difficult rules about whether or not the national language is spoken or understood at the region level, we can require that if any languages are defined, they all have to be defined.



Template:Language would be used to say "the place covered in this article uses the associated language." Examples: