Ask Your Question

how to change default UI language for all users in command prompt in ubuntu 18.04?

asked 2019-03-14 10:35:43 +0100

Eric Chang gravatar image

Hi all , I`m trying to build a new fresh environment for user desktop with libreoffice 6 althrough I install language pack

libreoffice-help-zh-tw/bionic-updates,bionic-updates,now 1:6.0.7-0ubuntu0.18.04.2 all [installed]
libreoffice-l10n-zh-tw/bionic-updates,bionic-updates,now 1:6.0.7-0ubuntu0.18.04.2 all [installed]

but default UI language is still English , that maybe related to client`s locale setting ( which is set to en_UW.UTF8).

is there anyway to change the default UI language to transitional Chinese without change user`s locale ?

I try to update the registrymodifications.xcu , change ooLocale to zh-TW , but it`s not working , UI still in English .

and I also try to update /usr/shares/applications/libreoffice6.1-writer.desktop append --language=zh-TW after the Exec string . it wroks ! but is there any system wide configuration to set the libreoffice UI language ?

I find there`s a folder in /etc/libreoffice , can I configure the language settings here ?

edit retag flag offensive close merge delete


What you are talking about is post deployment configuration. You'd need to provide relevant settings as .xcd to your installations' share/registry.

Mike Kaganski gravatar imageMike Kaganski ( 2019-03-14 11:13:40 +0100 )edit

2 Answers

Sort by » oldest newest most voted

answered 2019-03-15 11:41:36 +0100

updated 2019-03-18 10:24:03 +0100

Save this as an .xcd into <lo_instdir>/share/registry on your workstations:

<?xml version="1.0"?> 
<oor:data xmlns:xs="" xmlns:oor="">
  <dependency file="main" />
  <oor:component-data oor:name="Linguistic" oor:package="org.openoffice.Office">
    <node oor:name="General">
      <prop oor:name="UILocale"  oor:op="fuse" oor:type="xs:string">

See post deployment configuration.

Steps to create an own .xcd file for a random property (on the UILocale taken as an example):

  • Find the relevant setting in the registrymodifications.xcu. To do that, first backup the registrymodifications.xcu; then launch LibreOffice and make necessary configuration changes in UI; close LibreOffice and compare the new registrymodifications.xcu with its backup.

In this example, it's

<item oor:path="/org.openoffice.Office.Linguistic/General"><prop oor:name="UILocale" oor:op="fuse"><value>en-US</value></prop></item>
  • Find an existing .xcd in <lo_instdir>/share/registry, where the schema for the setting is defined.

In this example, it's main.xcd, where the setting is defined like this:

<?xml version="1.0"?>
<oor:data xmlns:xs="" xmlns:xsi="" xmlns:oor="">
    <oor:component-schema oor:package="org.openoffice.Office" oor:name="Linguistic" xml:lang="en-US">
            <group oor:name="General">
                <prop oor:name="UILocale" oor:type="xs:string" oor:nillable="false">
  • Create a new .xcd XML file with oor:data top-level element. Add the file with schema (main.xcd in this example) as the dependency for the newly created file by specifying <dependency file="main" /> as direct child of the top-level element.

  • For the oor:component-schema element from the schema file above, add relevant oor:component-data element there, with oor:name and oor:package attributes as in the schema. For each nested group element in schema, add a node element as a direct child of oor:component-data or higher-level node. Add the prop element, with relevant oor:name and oor:type attributes; it should also have oor:op attribute, which typically has fuse value; other possible values are modify, replace and remove. Add the desired value as the text of value element under the prop element.

edit flag offensive delete link more


there is already a file "Languagepack-zh-TW.xcd" in that folder , so it is not about setting UI ?

<?xml version="1.0"?>

<oor:data xmlns:xs="" xmlns:xsi="" xmlns:oor=""><dependency file="main"/> <oor:component-data oor:name="Setup" oor:package="org.openoffice"> <node oor:name="Office">
<node oor:name="InstalledLocales"> <node oor:name="zh-TW" oor:op="replace"> <prop oor:name="Origin"><value></value> </prop> </node> </node> </node> </oor:component-data></oor:data>

Eric Chang gravatar imageEric Chang ( 2019-03-18 02:05:27 +0100 )edit

It is about the locale installed (= available for selection), not selected.

Mike Kaganski gravatar imageMike Kaganski ( 2019-03-18 05:14:52 +0100 )edit

and is there any documents about add customized configuration using xcu ? I want to change default MeasureUint too, but I can not find any document about that in post deploymeant configuration about the XML syntax.

Eric Chang gravatar imageEric Chang ( 2019-03-18 06:36:09 +0100 )edit

thank you so much, I will try to create some xcd file according to your instructions.

Eric Chang gravatar imageEric Chang ( 2019-03-18 11:02:18 +0100 )edit

answered 2019-03-15 03:43:36 +0100

Eric Chang gravatar image

I found there`s a item named UILocale instead of OOLocale , change UILocale value to zh-tw , then UI language will be in zh-tw .

but Im still wondering if theres a system wide configuration to config the UI language for all users ? or otherwise , I have to update all users registrymodifications.xcu ...

edit flag offensive delete link more


I have mentioned the post-deployment configuration help; here I gave an answer how to prepare the .xcd, which e.g. on my Ubuntu is to be put to /opt/libreoffice6.1/share/registry. HTH.

Mike Kaganski gravatar imageMike Kaganski ( 2019-03-15 05:21:57 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-03-14 10:35:43 +0100

Seen: 915 times

Last updated: Mar 18 '19