Joerg,

Sorry about that, I should have been more detailed.. Responses below..


On 4/11/05 10:17 AM, "Joerg Barfurth" <[EMAIL PROTECTED]> wrote:

> Hi Brian,
> 
> Brian Raymond wrote:
>> I was looking at how the localization framework handles things using
>> getResText and it seems pretty straightforward given the classes which exist
>> to extract values.
>> 
> 
> Not sure what you are referring to here. What 'localization framework'
> do you have in mind?

I was referring to OOo's localization framework which looks like it uses
language.xba and .src files in the OOo source to build up the strings into
modules. I looked at the source of some of the java wizards to see how they
did it.

> 
>> I was wondering if a component can register a module on install or startup
>> with all of the strings for localization so the framework can be used?
>> 
> 
> What kind of component? Are you referring to an add-on component that is
> deployed using the UNO package manager? In that case, the easiest way is
> probably to (ab)use the configuration for this. You can install
> configuration schema and data files as part of UNO packages.

I have a Java UNO component deployed using the package manager.

> 
>> If not what is the most direct way to add support? I looked at some stuff
>> using the registry with support in my code for determining the local, I
>> assume that's the standard way to localize?
>> 
> 
> If with 'registry' you mean the OOo configuration services, yes, you can
> use them. Even OOo itself uses them (in version 2.0) to localize its
> menus. And you don't need to determine the locale yourself. If running
> in the openoffice.org process that is handled for you automatically.
> 
> To do this, you have to create a configuration schema (xcs-file)
> defining properties of type 'xs:string' which are marked as
> 'oor:localized="true"'. Then you can provide a data file (xcu) that
> provides the localized texts.

The only thing I've seen code on are things that use the configuration
services and in the java code uses the locale setting to pull the right
string out. I haven't seen anything that does it automatically as you
suggest. Is it possible for you to point me to a code sample showing how to
do this in java?

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

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

Reply via email to