1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2cdf0e10cSrcweir
382a1df74SAndrew Rist<!--***********************************************************
4f17aaf3cSmseidel *
582a1df74SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
682a1df74SAndrew Rist * or more contributor license agreements.  See the NOTICE file
782a1df74SAndrew Rist * distributed with this work for additional information
882a1df74SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
982a1df74SAndrew Rist * to you under the Apache License, Version 2.0 (the
1082a1df74SAndrew Rist * "License"); you may not use this file except in compliance
1182a1df74SAndrew Rist * with the License.  You may obtain a copy of the License at
12f17aaf3cSmseidel *
1382a1df74SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
14f17aaf3cSmseidel *
1582a1df74SAndrew Rist * Unless required by applicable law or agreed to in writing,
1682a1df74SAndrew Rist * software distributed under the License is distributed on an
1782a1df74SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1882a1df74SAndrew Rist * KIND, either express or implied.  See the License for the
1982a1df74SAndrew Rist * specific language governing permissions and limitations
2082a1df74SAndrew Rist * under the License.
21f17aaf3cSmseidel *
2282a1df74SAndrew Rist ***********************************************************-->
2382a1df74SAndrew Rist
24f17aaf3cSmseidel<helpdocument version="1.0">
25cdf0e10cSrcweir<meta>
26cdf0e10cSrcweir<topic id="textsbasicguidetranslationxml" indexer="include" status="PUBLISH">
27cdf0e10cSrcweir<title id="tit" xml-lang="en-US">Translation of Controls in the Dialog Editor</title>
28cdf0e10cSrcweir<filename>/text/sbasic/guide/translation.xhp</filename>
29cdf0e10cSrcweir</topic>
30cdf0e10cSrcweir</meta>
31cdf0e10cSrcweir<body>
3288cae784Smseidel<bookmark xml-lang="en-US" branch="index" id="bm_id8915372">
3388cae784Smseidel<bookmark_value>dialogs;translating</bookmark_value>
34cdf0e10cSrcweir<bookmark_value>localizing dialogs</bookmark_value>
35cdf0e10cSrcweir<bookmark_value>translating dialogs</bookmark_value>
36cdf0e10cSrcweir</bookmark>
37cdf0e10cSrcweir<paragraph role="heading" id="hd_id3574896" xml-lang="en-US" level="1" l10n="NEW"><variable id="translation"><link href="text/sbasic/guide/translation.xhp">Translation of Controls in the Dialog Editor</link>
38cdf0e10cSrcweir</variable></paragraph>
39cdf0e10cSrcweir<paragraph role="paragraph" id="par_id4601940" xml-lang="en-US" l10n="NEW"><ahelp hid=".">The Language toolbar in the Basic IDE dialog editor shows controls to enable and manage localizable dialogs.</ahelp></paragraph>
40cdf0e10cSrcweir<paragraph role="paragraph" id="par_id9538560" xml-lang="en-US" l10n="NEW">By default, any dialog that you create only contains string resources for one language. You may want to create dialogs that automatically show localized strings according to the user's language settings.</paragraph><comment>current language listbox</comment>
41*9b5c5849Smseidel<bookmark xml-lang="en-US" branch="hid/.uno:CurrentLanguage" id="bm_id9421979" localize="false"/>
42*9b5c5849Smseidel<paragraph role="paragraph" id="par_id6998809" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select the language for the strings that you want to edit. Click the Manage Languages icon to add languages.</ahelp></paragraph><comment>Manage Language icon is in sbasic/shared/02/20000000.xhp</comment><comment>present languages box in manage user interface language dialog</comment>
43*9b5c5849Smseidel<bookmark xml-lang="en-US" branch="hid/basctl:ListBox:RID_DLG_MANAGE_LANGUAGE:LB_LANGUAGE" id="bm_id1646778" localize="false"/>
44*9b5c5849Smseidel<paragraph role="paragraph" id="par_id71413" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Click a language, then click Default to set the language as default, or click Delete to remove the language from the list.</ahelp></paragraph><comment>add</comment>
45*9b5c5849Smseidel<bookmark xml-lang="en-US" branch="hid/basctl:PushButton:RID_DLG_MANAGE_LANGUAGE:PB_ADD_LANG" id="bm_id1228370" localize="false"/>
46*9b5c5849Smseidel<paragraph role="paragraph" id="par_id2924283" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Opens a dialog where you can add a language to the list.</ahelp></paragraph><comment>delete</comment>
47*9b5c5849Smseidel<bookmark xml-lang="en-US" branch="hid/basctl:PushButton:RID_DLG_MANAGE_LANGUAGE:PB_DEL_LANG" id="bm_id1601611" localize="false"/>
48*9b5c5849Smseidel<paragraph role="paragraph" id="par_id5781731" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select a language in the list and click Delete to remove that language. When you remove all languages, the string resources for localizable dialogs are removed from all dialogs in the current library.</ahelp></paragraph><comment>default</comment>
49*9b5c5849Smseidel<bookmark xml-lang="en-US" branch="hid/BASCTL_PUSHBUTTON_RID_DLG_MANAGE_LANGUAGE_PB_MAKE_DEFAULT" id="bm_id733359" localize="false"/>
50*9b5c5849Smseidel<paragraph role="paragraph" id="par_id6942045" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select a language in the list and click Default to set the language as default language.</ahelp></paragraph><comment>set default user interface dialog</comment>
51*9b5c5849Smseidel<bookmark xml-lang="en-US" branch="hid/basctl:ListBox:RID_DLG_SETDEF_LANGUAGE:LB_DEF_LANGUAGE" id="bm_id879848" localize="false"/>
52*9b5c5849Smseidel<paragraph role="paragraph" id="par_id4721823" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">The default language will be used as a source for all other language strings.</ahelp></paragraph><comment>available languages box</comment>
53*9b5c5849Smseidel<bookmark xml-lang="en-US" branch="hid/BASCTL_HID_BASICIDE_ADDNEW_CONTROL" id="bm_id8675191" localize="false"/>
54*9b5c5849Smseidel<paragraph role="paragraph" id="par_id5806756" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Add UI languages for your dialog strings.</ahelp></paragraph>
55cdf0e10cSrcweir<paragraph role="heading" id="hd_id6596881" xml-lang="en-US" level="2" l10n="NEW">To enable localizable dialogs</paragraph>
56cdf0e10cSrcweir<list type="ordered">
57cdf0e10cSrcweir<listitem>
5823444184Smseidel<paragraph role="paragraph" id="par_id8750572" xml-lang="en-US" l10n="NEW">In the Basic IDE dialog editor, open the Language toolbar choosing <item type="menuitem">View - Toolbars - Language</item>.</paragraph>
59cdf0e10cSrcweir<paragraph role="paragraph" id="par_id2224494" xml-lang="en-US" l10n="NEW">If the current library already contains a localizable dialog, the Language toolbar is shown automatically.</paragraph>
60cdf0e10cSrcweir</listitem>
61cdf0e10cSrcweir<listitem>
62f17aaf3cSmseidel<paragraph role="paragraph" id="par_id7359233" xml-lang="en-US" l10n="NEW">Click the <emph>Manage Language</emph> icon
63cdf0e10cSrcweir<image id="img_id2526017" src="res/commandimagelist/sc_managelanguage.png" width="0.1665inch" height="0.1665inch"><alt id="alt_id2526017" xml-lang="en-US">Manage Language icon</alt>
64f17aaf3cSmseidel</image> on the Language toolbar or on the Toolbox bar.</paragraph>
65cdf0e10cSrcweir<paragraph role="paragraph" id="par_id6549272" xml-lang="en-US" l10n="NEW">You see the Manage User Interface Language dialog. The dialog manages languages for the current library. The name of the current library is shown on the title bar.</paragraph>
66cdf0e10cSrcweir</listitem>
67cdf0e10cSrcweir<listitem>
6888cae784Smseidel<paragraph role="paragraph" id="par_id6529740" xml-lang="en-US" l10n="NEW">Click Add in the dialog to add a language entry.</paragraph>
69cdf0e10cSrcweir<paragraph role="paragraph" id="par_id7811822" xml-lang="en-US" l10n="NEW">This step enables all new dialogs to contain localizable string resources.</paragraph>
70cdf0e10cSrcweir</listitem>
71cdf0e10cSrcweir<listitem>
72cdf0e10cSrcweir<paragraph role="paragraph" id="par_id9121982" xml-lang="en-US" l10n="NEW">The first time you click Add, you see the Set Default User Interface Language dialog. The following times you click Add, this dialog has the name Add User Interface Language.</paragraph>
73cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3640247" xml-lang="en-US" l10n="NEW">You can also change the default language in the Manage User Interface Language dialog.</paragraph>
74cdf0e10cSrcweir</listitem>
75cdf0e10cSrcweir<listitem>
76f17aaf3cSmseidel<paragraph role="paragraph" id="par_id3808404" xml-lang="en-US" l10n="NEW">Select a language.</paragraph>
77cdf0e10cSrcweir<paragraph role="paragraph" id="par_id4585100" xml-lang="en-US" l10n="NEW">This adds string resources to contain the translated versions of all strings to the dialog properties. The set of dialog strings of the default language is copied to the new set of strings. Later, you can switch to the new language and then translate the strings.</paragraph>
78cdf0e10cSrcweir</listitem>
79cdf0e10cSrcweir<listitem>
80cdf0e10cSrcweir<paragraph role="paragraph" id="par_id2394482" xml-lang="en-US" l10n="NEW">Close the dialog or add additional languages.</paragraph>
81cdf0e10cSrcweir</listitem>
82cdf0e10cSrcweir</list>
83cdf0e10cSrcweir<paragraph role="heading" id="hd_id631733" xml-lang="en-US" level="2" l10n="NEW">To edit localizable controls in your dialog</paragraph>
84cdf0e10cSrcweir<paragraph role="paragraph" id="par_id2334665" xml-lang="en-US" l10n="NEW">Once you have added the resources for localizable strings in your dialogs, you can select the current language from the Current Language listbox on the Language toolbar.</paragraph>
85cdf0e10cSrcweir<list type="ordered">
86cdf0e10cSrcweir<listitem>
87cdf0e10cSrcweir<paragraph role="paragraph" id="par_id8956572" xml-lang="en-US" l10n="NEW">Switch the Current Language listbox to display the default language.</paragraph>
88cdf0e10cSrcweir</listitem>
89cdf0e10cSrcweir<listitem>
90cdf0e10cSrcweir<paragraph role="paragraph" id="par_id500808" xml-lang="en-US" l10n="NEW">Insert any number of controls to your dialog and enter all strings you want.</paragraph>
91cdf0e10cSrcweir</listitem>
92cdf0e10cSrcweir<listitem>
93cdf0e10cSrcweir<paragraph role="paragraph" id="par_id8366649" xml-lang="en-US" l10n="NEW">Select another language in the Current Language listbox.</paragraph>
94cdf0e10cSrcweir</listitem>
95cdf0e10cSrcweir<listitem>
96cdf0e10cSrcweir<paragraph role="paragraph" id="par_id476393" xml-lang="en-US" l10n="NEW">Using the control's property dialogs, edit all strings to the other language.</paragraph>
97cdf0e10cSrcweir</listitem>
98cdf0e10cSrcweir<listitem>
99cdf0e10cSrcweir<paragraph role="paragraph" id="par_id2655720" xml-lang="en-US" l10n="NEW">Repeat for all languages that you added.</paragraph>
100cdf0e10cSrcweir</listitem>
101cdf0e10cSrcweir</list>
10223444184Smseidel<paragraph role="paragraph" id="par_id3682058" xml-lang="en-US" l10n="NEW">The user of your dialog will see the strings of the user interface language of the user's version of %PRODUCTNAME, if you did provide strings in that language.</paragraph>
10323444184Smseidel<paragraph role="paragraph" id="par_id5977965" xml-lang="en-US" l10n="NEW">If no language matches the user's version, the user will see the default language strings.</paragraph>
104cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3050325" xml-lang="en-US" l10n="NEW">If the user has an older version of %PRODUCTNAME that does not know localizable string resources for Basic dialogs, the user will see the default language strings.</paragraph>
105cdf0e10cSrcweir<section id="relatedtopics">
106cdf0e10cSrcweir<embed href="text/sbasic/guide/create_dialog.xhp#create_dialog"/>
107cdf0e10cSrcweir<embed href="text/sbasic/guide/insert_control.xhp#insert_control"/>
108cdf0e10cSrcweir<embed href="text/sbasic/guide/show_dialog.xhp#show_dialog"/>
109cdf0e10cSrcweir<embed href="text/sbasic/guide/sample_code.xhp#sample_code"/>
110cdf0e10cSrcweir</section>
111cdf0e10cSrcweir</body>
112cdf0e10cSrcweir</helpdocument>
113