From e95748284bcc77937824756fbbe4b2a9d57297e1 Mon Sep 17 00:00:00 2001
From: David Robillard
Date: Mon, 5 Mar 2012 00:33:51 +0000
Subject: Update to support 2-character language codes with new lexvo URIs
(courtesy of Gerard de Melo).
---
lv2/lv2plug.in/ns/ext/atom/atom.ttl | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
(limited to 'lv2/lv2plug.in/ns/ext/atom')
diff --git a/lv2/lv2plug.in/ns/ext/atom/atom.ttl b/lv2/lv2plug.in/ns/ext/atom/atom.ttl
index 4d7c98e..63304b0 100644
--- a/lv2/lv2plug.in/ns/ext/atom/atom.ttl
+++ b/lv2/lv2plug.in/ns/ext/atom/atom.ttl
@@ -188,8 +188,9 @@ string in any language or a value of any type. A Literal has a
encoding. The length of the string data in bytes is size -
sizeof(LV2_Atom_Literal)
, including the terminating NULL character. The
lang
field SHOULD be a URI of the form
-<http://lexvo.org/id/iso639-3/LANG> where LANG is an ISO 693-3 language code.
+<http://lexvo.org/id/iso639-3/LANG> or
+<http://lexvo.org/id/iso639-1/LANG> where LANG is a 3-character ISO 693-3
+language code, or a 2-character ISO 693-1 language code, respectively.
A Literal may have a datatype
OR a lang
, but never
both.
@@ -200,7 +201,7 @@ void set_to_hello_in_english(LV2_Atom_Literal* lit) {
lit->atom.type = map(expand("atom:Literal"));
lit->atom.size = 14;
lit->datatype = 0;
- lit->lang = map("http://lexvo.org/id/iso639-3/eng");
+ lit->lang = map("http://lexvo.org/id/iso639-1/en");
memcpy(LV2_ATOM_CONTENTS(LV2_Atom_Literal, lit),
"Hello",
sizeof("Hello")); // Assumes enough space
--
cgit v1.2.1