[loc-en-dev] getLocaleKeywordKeys/getLocaleKeywordValue

Yoshito Umaoka y.umaoka at gmail.com
Thu Mar 12 12:40:27 PDT 2009


Doug Felt wrote:
> My preference is for
>
> Locale.getLDMLExtensionKeys
> Locale.getLDMLExtensionValue
> Builder.setLDMLExtensionValue(char key, String value);
>
> To my mind, this better communicates that
> - this is a key/value map
> - it's subordinate to an extension
> - it's represented as an LDML extension in the language tag
>
> I find the term 'type' unfortunate and misleading, and I don't see a 
> pressing need to push this LDML terminology into the Java arena.  I'd 
> rather reuse common terminology that reflects the semantics of the 
> operation.
>
> Doug
Because I also added - public static final char LMDL_EXTENSION_KEY = 
'u', I was worrying about if someone get confused with 
getLDMLExtensionXXX.  I do not like the term Keyword key and "type", but 
if we say "getLDMLExtensionValue", it looks like a value associated with 
LDML_EXTENSION_KEY.  So, how about this?

public static final char PRIVATE_USE_EXTENSION = 'x'; // changed from 
PRIVATE_USE_KEY
public static final char LDML_EXTENSION = 'u'; // changed from 
LOCALE_EXTENSION_KEY

Then,

Locale.getLDMLExtensionKeys ( <- getLDMLKeys)
Locale.getLDMLExtensionValue ( <- getLDMLType)
Builder.setLDMLExtensionValue ( <- setLDMLKeyword)

If no objections, I'll make the name changes.

-Yoshito



More information about the locale-enhancement-dev mailing list