Thanks Ariel,

That works pretty well. Still leaves me a little curious about pull this back as a locale structure, but that can be for another day..

One slight change to the calling function - to support the Chinese ISO language codes zh-TW, zh-CN ( there are some other 5 character ISO language codes also ).

function getLanguage() as string
 Dim oConfig as Object
 Dim sLocale() as Variant
Dim sOfficeLocaleAsString$ oConfig = getConfigurationAccess("/org.openoffice.Setup/L10N", false) sOfficeLocaleAsString = oConfig.getByName( "ooLocale" )
 sLocale = Split(sOfficeLocaleAsString, "-")

 if sLocale(0) <> "zh" then

   getLanguage = sLocale(0)

 else

   getLanguage = sOfficeLocaleAsString

 endif

End function

I actually installed the 2.3.1 Chinese zh-TW distribution package and tested it.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to