You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RDF includes a special attribute for string literals called a [language tag](https://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal). Language tags let developers provide string values for many different translations. This library provides `LanguagePreferences` to declaratively control which translations are read and written.
175
+
176
+
A language preference is an ordered list of [IETF language tags](https://en.wikipedia.org/wiki/IETF_language_tag) plus the special tags `@none` (matches strings without a language tag) and `@other` (matches any language not explicitly listed).
177
+
178
+
-**Read** operations return the value matching the highest-priority preference.
179
+
-**Write** operations use the first non-`@other` preference as the language tag.
`OptionalFrom.subjectPredicateByLanguage` and `OptionalAs.objectByLanguage` work the same way but return `undefined` when no match is found and remove all language-tagged quads when set to `undefined`.
0 commit comments