Configuration Options for Localization of OpenOffice.org 2.0

 

This file contains work in progress.

Its might (and probably will) change often without warning.

 

 

Javier SOLA - www.khmeros.info - Last edited 04/23/2005

 

 

Start-up configuration options

Control dialog box size

 


 

 

Start-up configuration options

If you want to have some UI language or locale configuration options in your own build, you need to create a file called Linguistic.xcu that needs to be placed in the directory:

officecfg/registry/data/org/openoffice/Office

Note that this file cannot be committed to the common source, as it is the same name for all languages, and should not contain contradictory statements.

Note: This is not entirely true. You actually can accomodate contradictory settings in this file, which then are distributed to multiple files during the build. But you have to make sure only one of these files is installed. Thus, if the scp part is conditionalized appropriately, this could be included into the common source. But in a normal build, without special-purpose configure options this should not be included.

Working on options can be complicated; you really need to know what you are doing. If you are not sure, you should probably subscribe to the dev@util.openoffice.org mailing list and ask there.

As an example if you were planning to create an English (en_US) and Khmer (km) bi-lingual build, the installer would work in English, and the default language for OOo when it started the first time would be Khmer... but if what you want is that -once installed- the system starts automatically in Khmer (UI in Khmer by default), using Khmer locale by default and selecting Khmer as the CTL language by default, then you need to change the configuration.

In this case, your Linguistic.xcu file would have to include:

<?xml version="1.0" encoding="UTF-8"?>
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry"
                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    oor:name="Linguistic"
                    oor:package="org.openoffice.Office">
 <node oor:name="General">
  <prop oor:name="UILocale" oor:type="xs:string">
   <value>km</value>
  </prop>
  <prop oor:name="DefaultLocale_CTL" oor:type="xs:string">
   <value>km</value>
  </prop>
 </node>
</oor:component-data>
 

Note: To allow multiple contradicting values to coexist, you would have to change both occurances of <value>km</value> to
 <value install:module="km">km</value>

(you can use <value install:module="XX">some value</value>, with different XX to add different values)

You also have to add the attribute xmlns:install="http://openoffice.org/2004/installation" to the oor:component-data element in this case.

Once you create the file, you need to include infomation about it in

officecfg/registry/data/org/openoffice/Office/makefile.mk

under XCUFILES.

Note: If you have added the install:module attribute, you (additionally) need to add "Linguistic-km.xcu" to MODULEFILES. More generally you need to add "Linguistic-XX.xcu" for all XX you used in the install:module attribute to MODULEFILES.

 

--------------------

Add an entry for the file in file /scp2/source/ooo/file_ooo.scp so that it gets packed by the installer. You need to include an entry of the type:

File gid_File_Oo_Office_Linguistics_Xcu_Khmer

    TXT_FILE_BODY;

    Styles = (PACKED);

    Dir = gid_Dir_Share_Registry_Data_Org_Openoffice_Office;

    Name = "/registry/data/org/openoffice/Office/Linguistics.xcu";

End

Note: If you went with the install:modules version, you need to use

 File gid_File_Oo_Office_Linguistics_LanguagePreselect_Xcu
    TXT_FILE_BODY;
    Styles = (PACKED);
    Dir = gid_Dir_Share_Registry_Modules_Oo_Office_Linguistic
    Name = "/registry/spool/org/openoffice/Office/Linguistics-km.xcu";
 End

Use Name= "/registry/spool/org/openoffice/Office/Linguistics-XX.xcu" conditionally for other preselections.

Be sure that the entry has a unique gid_... identifier (search the file to make sure that gid_File_Oo_Office_Linguistics_Xcu does not exist anywhere else). In a normal case this modification is for your own build, it should NOT be submitted for inclusion in the common repository. If you use install:module and appropriate conditionals in scp2, you could add it. But for private use your simpler version is sufficient.

 


 

Control dialog box size

 

If you need to change the horizontal size (scale) of controls in dialogs, you can do it by modifying the value corresponding to your locale in the table ..... in file

 

officecfg/registry/data/org/openoffice/Office/Common.xcu

 

You can see that there is a number asssociated to each locale (usually 10 or 13). It is a number between 0 and 100 that indicates how large the controls should be. To make a change, include your locale here with a number, and change it if necessary... or increase it if the locale is already there. The size of the dialog window itself will be scaled as well.