Hello Ariel,
Ariel Constenla-Haile wrote (1-2-2009 1:46)
On Saturday 31 January 2009 22:14, Cor Nouws wrote:
reading this
http://api.openoffice.org/docs/common/ref/com/sun/star/i18n/LanguageCountry
Info.html and knowing what is returned for other languages ("en_GB" for
exmaple), I wonder how it is possible that for my local Dutch installation,
I get only "nl" as return value in this function:
sProvider = "com.sun.star.configuration.ConfigurationProvider"
sAccess = "com.sun.star.configuration.ConfigurationAccess"
oConfigProvider = createUnoService(sProvider)
oParm(0).Name = "nodepath"
oParm(0).Value = "/org.openoffice.Setup/L10N"
oSet = oConfigProvider.createInstanceWithArguments(sAccess, oParm())
OOoLangue = oSet.getbyname("ooLocale") ' might be xx_XX of only xx
OOoLanguage = Lcase(Left(trim(OOoLangue),2))
OOoCountry = UCase(Right(trim(OOoLangue),2))
you can save your time by reusing existing code: OOo Basic libraries :-)
in this case:
oLibs = GlobalScope.BasicLibraries
If NOT oLibs.isLibraryLoaded("Tools") Then oLibs.loadLibrary("Tools")
( I once understood -but did not check the source code- that
LoadLibrary itself checks if a library is already loaded. )
Dim aLocale as New com.sun.star.lang.Locale
aLocale = GetStarOfficeLocale()
Thanks - probably it happens more oftne that I write code for existing
functions ;-)
Which retuns 'nl' and 'NL' or 'en' and 'GB' etc...
But that might be wrong in some situations. Plus that I don not
understand what really is the cause of this.
Any ideas?
What do you see under Tools - Options - Language Settings - Languages?:
Languege of
User interface ....
do you see "Dutch" or "Dutch (Netherlands)"?
Nederlands(NL).
If the first, then it is a general OOo issue.
If the second, something may be wrong in your configuration.
First look at the node, something like
<node oor:name="L10N">
<prop oor:name="ooLocale" oor:type="xs:string">
<value>en-US</value>
</prop>
</node>
I had a look there already yesterday before posting.
And it only has "nl"
Is this also wrong ( ooLocale is nl and not nl-NL?)?
I'm not sure if that is wrong - see mail Bernard Marcelly.
If so, try removing the Setup.xcu in the user layer
~/.openoffice.org/3/user/registry/data/org/openoffice/Setup.xcu (and may be also
the cache in ~/.openoffice.org/3/user/registry/cache/org.openoffice.Setup.dat),
I don't know if the value is taken from a localized Setup.xcu in the shared
layer, or OOo sets this at installation on the user layer; at least, the
default installation
(/opt/openoffice.org/basis3.0/share/registry/data/org/openoffice/Setup.xcu) has
the L10N node empty; don't have a localized version to check, but in yours: is
the L10N node empty? if not, ooLocale is nl or nl-NL?
Yes I know the setup.xcu. And that shows only "nl" as well.
I'll try later to start with a fress setup.
But the question came up, since for the StringResourceWithLocation (see
mail on d...@extensions, 16-1-09 (1) ) I need to give a Locale as
argument. Plus that I see that the files with the strings, indeed are
named "DialogStrings_nl_NL.properties" and "DialogStrings_fr_FR.properties"
I did not check yet if StringResourceWithLocation does allow for an
Locale with only a value for the country. But definitely there is a
routine somewhere, that makes it possible for 'locales' "nl" and "fr" to
be used to find the above mentioned files.
Regards,
Cor
1) http://extensions.openoffice.org/servlets/ReadMsg?list=dev&msgNo=1507
--
Cor Nouws - nl.OpenOffice.org marketing contact
= "2008: The Year of 3" = www.nieuwsteoffice.nl =
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org