Language Support Pattern

I’m trying to understand the Language Support Pattern. I made a start making an example data package for this ISO-639-1-codes.csv. I think it’s a bit wrong.

What I think needs to be made clearer in the pattern is:

  • explain not to provide translations for name properties as these are used as references (e.g. for primaryKeys)
  • emphasise providing translations for title and description properties
  • explain how to reference translations of licenses for the title and path properties
  • explain how to provide translations for contributor title, organisation (and possibly role?)
  • explain how to provide translations for keywords

So I’m having a go at these and I’d like your feedback on if I got close…

{
  "profile": "tabular-data-package",
  "name": "iso-639-1-language-codes",
  "languages": ["en", "es"],
  "title": {
    "": "ISO 639-1 Language Codes",
    "es": "ISO 639-1 Códigos de idioma"
  },
  "description": {
    "": "ISO 639-1 two-letter language codes",
    "es": "ISO 639-1 códigos de idioma de dos letras"
  },
  "version": "0.1.0",
  "keywords": {
    "": "language",
    "es": "idioma"
  },
  "licenses": [{
    "title": {
      "": "Creative Commons Attribution Share-Alike 3.0",
      "es": "Reconocimiento-CompartirIgual 3.0 España"
    },
    "path": {
      "": "https://creativecommons.org/licenses/by-sa/3.0/",
      "es": "https://creativecommons.org/licenses/by-sa/3.0/es/"
    }
  }],
  "contributors": [{
    "title": "Joe Bloggs",
    "email": "joe@bloggs.com",
    "path": "http://www.bloggs.com",
    "role": {
      "": "author",
      "es": "autor"
    },
    "organization": {
      "": "International Organization for Standardization",
      "es": "Organización Internacional para la Estandarización"
    }
  }],
  "resources": [{
    "profile": "tabular-data-resource",
    "path": "data/ISO-639-1-codes.csv",
    "name": "iso-639-1-codes",
    "title": {
      "": "ISO 639-1 language codes",
      "es": "ISO 639-1 códigos de idioma"
    },
    "description": {
      "": "ISO 639-1: two-letter language codes",
      "es": "ISO 639-1 códigos de idioma de dos letras"
    },
    "encoding": "utf-8",
    "format": "csv",
    "mediatype": "text/csv",
    "sources": [{
      "title": "List of ISO 639-1 codes",
      "path": "https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes"
    }],
    "schema": {
      "fields": [{
          "name": "ISO language name",
          "title": {
            "": "ISO language name",
            "es": "ISO Nombre del lenguaje"
          },
          "type": "string",
          "format": "default",
          "constraints": {
            "required": true
          }
        },
        {
          "name": "Native name (endonym)",
          "title": {
            "": "Native name (endonym)",
            "es": "Nombre nativo (endónimo)"
          },
          "type": "string",
          "format": "default"
        },
        {
          "name": "639-1",
          "type": "string",
          "format": "default"
        },
        {
          "name": "Notes",
          "title": {
            "": "Notes",
            "es": "Notas"
          },
          "type": "string",
          "format": "default"
        }
      ],
      "missingValues": [
        ""
      ],
      "primaryKeys": [
        "639-1"
      ]
    },
    "dialect": {
      "delimiter": ",",
      "quoteChar": "\"",
      "header": true,
      "doubleQuote": true,
      "lineTerminator": "\r\n",
      "skipInitialSpace": true,
      "caseSensitiveHeader": false
    }
  }]
}

1 Like

Some things I found confusing in the pattern were:

Resources array term

I’m confused by the term “resources array” in this sentence.

Language support deals with declaring the default language of a descriptor and the data it contains in the resources array.

I think language support applies to the whole descriptor (i.e. at the package and resource levels) as shown in the data package title, description, keywords, licenses and contributors properties in the example above.

Equivalence example

The statement:

# which is equivalent to

in the example code below is only equivalent for the Spanish (“es”) language.

In the first example, as no English (“en”) language value is specified, title is Sol for every language. I suggest “Sun” is replaced with “Sol” in the second example.

{
  "name": "sun-package",
  "languages": ["es", "en"],
  "title": "Sol"
}

# which is equivalent to
{
  "name": "sun-package",
  "languages": ["es", "en"],
  "title": {
    "": "Sol",
    "en": "Sun"
  }
}
1 Like