vi vs. vi_VN local codes

edited March 8, 2021
Greetings,
I am looking for some clarification on the use of values in the language field for Zotero.
My understanding is that the values in this field should line up with those in CSL which are enumerated at: https://github.com/citation-style-language/locales/wiki

What this would mean for vietnamese would be that "vi" is invalid, while vi_VN is valid.

Is that a correct understanding?

I further understand that nonblank or non "en" values will result in capitalization in CSL based output being turned off.

Is that also correct?
  • What this would mean for vietnamese would be that "vi" is invalid, while vi_VN is valid.
    I don't think we've ever made a formal decision on this (and currently Zotero doesn't do anything with the language tags other than disabling title case), but I'd assume that vi would be valid, the same way that you can use it for a locale within a CSL file.
  • I further understand that nonblank or non "en" values will result in capitalization in CSL based output being turned off.
    That's correct, yes. IIRC, it also gets turned off for blank locales with text-case="title" and a non-en locale used for the style
  • Any further usage of locale codes will likely need to accommodate two letter codes given their ubiquity (so “vi” will be fine). If you store four letter codes, use a hyphen instead of underscore (so “vi-VN” rather than “vi_VN”).
  • edited March 9, 2021
    @bwiernik Thank you for this clarification. I know we have chatted on other threads about language codes, and this is helpful advice. It is my understanding that the hyphen is used in BCP47, while the underscore is used in Unicode locales. See::: https://unicode-org.github.io/cldr/ldml/tr35.html#Unicode_Locale_Identifier_CLDR_to_BCP_47

    FWIW: two letter codes should not be considered on the basis of their ubiquity, but rather on the basis of their merit as prescribed in BCP47, which calls for their use on the basis of ISO639-1 and then supplements ISO639-1 with ISO639-3 for languages not covered in 639-1.
Sign In or Register to comment.