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
Mallard Conditionals 1.0 defines the lang: test token prefix to check against the language of the page (or nearest ancestor with an xml:lang attribute). What I would like to do is check for aspects of a language or locale, without listing specific languages. The biggest thing is being able to check on directionality. I would like to detect RTL languages without writing a test expression like "lang:ar, lang:ckb, lang:fa, lang:he, lang:ug". Another example that might be useful is testing the primary script being used. such as Latin (Latn), Cyrillic (Cyrl), or Arabic (Arab). (Script tags: https://en.wikipedia.org/wiki/ISO_15924). These are both pieces of information that a processing tool can reasonably be expected to know about a supported locale.
I have three ideas on how this could be encoded, from most concise to least:
Use a dash after lang: and a thing to test, like lang:-rtl or lang:-Cyrl.
Use brand new prefixes, like dir:rtl or script:Cyrl.
Use a sort of subprefix of lang:, like lang:dir:rtl or lang:script:Cyrl.
I like that (1) and (3) keep things lumped with language. I like that (2) and (3) are explicit about what's being tested. But I also like that (1) is super fast to write. I don't have a strong preference yet.
The text was updated successfully, but these errors were encountered:
I meant to write my use case for testing directionality. I'm working on using more abstract diagrams in docs instead of actual screenshots. If these diagrams avoid words, they don't have to be translated. Except RTL locales would need a flipped diagram. So if the source pages can just provide two versions and use conditional processing, translators don't have to do any work. Something like this:
Mallard Conditionals 1.0 defines the
lang:
test token prefix to check against the language of the page (or nearest ancestor with anxml:lang
attribute). What I would like to do is check for aspects of a language or locale, without listing specific languages. The biggest thing is being able to check on directionality. I would like to detect RTL languages without writing a test expression like"lang:ar, lang:ckb, lang:fa, lang:he, lang:ug"
. Another example that might be useful is testing the primary script being used. such as Latin (Latn), Cyrillic (Cyrl), or Arabic (Arab). (Script tags: https://en.wikipedia.org/wiki/ISO_15924). These are both pieces of information that a processing tool can reasonably be expected to know about a supported locale.I have three ideas on how this could be encoded, from most concise to least:
lang:
and a thing to test, likelang:-rtl
orlang:-Cyrl
.dir:rtl
orscript:Cyrl
.lang:
, likelang:dir:rtl
orlang:script:Cyrl
.I like that (1) and (3) keep things lumped with language. I like that (2) and (3) are explicit about what's being tested. But I also like that (1) is super fast to write. I don't have a strong preference yet.
The text was updated successfully, but these errors were encountered: