1<?xml version="1.0" encoding="UTF-8"?> 2 3 4 5<!-- 6 *********************************************************************** 7 * 8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9 * 10 * Copyright 2000, 2010 Oracle and/or its affiliates. 11 * 12 * OpenOffice.org - a multi-platform office productivity suite 13 * 14 * This file is part of OpenOffice.org. 15 * 16 * OpenOffice.org is free software: you can redistribute it and/or modify 17 * it under the terms of the GNU Lesser General Public License version 3 18 * only, as published by the Free Software Foundation. 19 * 20 * OpenOffice.org is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 * GNU Lesser General Public License version 3 for more details 24 * (a copy is included in the LICENSE file that accompanied this code). 25 * 26 * You should have received a copy of the GNU Lesser General Public License 27 * version 3 along with OpenOffice.org. If not, see 28 * <http://www.openoffice.org/license.html> 29 * for a copy of the LGPLv3 License. 30 * 31 ************************************************************************ 32 --> 33 34 35 <helpdocument version="1.0"> 36<meta> 37<topic id="textsbasicguidetranslationxml" indexer="include" status="PUBLISH"> 38<title id="tit" xml-lang="en-US">Translation of Controls in the Dialog Editor</title> 39<filename>/text/sbasic/guide/translation.xhp</filename> 40</topic> 41</meta> 42<body> 43<bookmark xml-lang="en-US" branch="index" id="bm_id8915372"><bookmark_value>dialogs;translating</bookmark_value> 44<bookmark_value>localizing dialogs</bookmark_value> 45<bookmark_value>translating dialogs</bookmark_value> 46</bookmark> 47<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> 48</variable></paragraph> 49<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> 50<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> 51<bookmark xml-lang="en-US" branch="hid/.uno:CurrentLanguage" id="bm_id9421979" localize="false"/><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> 52<bookmark xml-lang="en-US" branch="hid/basctl:ListBox:RID_DLG_MANAGE_LANGUAGE:LB_LANGUAGE" id="bm_id1646778" localize="false"/><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> 53<bookmark xml-lang="en-US" branch="hid/basctl:PushButton:RID_DLG_MANAGE_LANGUAGE:PB_ADD_LANG" id="bm_id1228370" localize="false"/><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> 54<bookmark xml-lang="en-US" branch="hid/basctl:PushButton:RID_DLG_MANAGE_LANGUAGE:PB_DEL_LANG" id="bm_id1601611" localize="false"/><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> 55<bookmark xml-lang="en-US" branch="hid/BASCTL_PUSHBUTTON_RID_DLG_MANAGE_LANGUAGE_PB_MAKE_DEFAULT" id="bm_id733359" localize="false"/><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> 56<bookmark xml-lang="en-US" branch="hid/basctl:ListBox:RID_DLG_SETDEF_LANGUAGE:LB_DEF_LANGUAGE" id="bm_id879848" localize="false"/><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> 57<bookmark xml-lang="en-US" branch="hid/BASCTL_HID_BASICIDE_ADDNEW_CONTROL" id="bm_id8675191" localize="false"/><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> 58<paragraph role="heading" id="hd_id6596881" xml-lang="en-US" level="2" l10n="NEW">To enable localizable dialogs</paragraph> 59<list type="ordered"> 60<listitem> 61<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> 62<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> 63</listitem> 64<listitem> 65<paragraph role="paragraph" id="par_id7359233" xml-lang="en-US" l10n="NEW">Click the <emph>Manage Languages</emph> icon 66<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> 67 </image> on the Language toolbar or on the Toolbox bar.</paragraph> 68<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> 69</listitem> 70<listitem> 71<paragraph role="paragraph" id="par_id6529740" xml-lang="en-US" l10n="NEW">Click Add in the dialog to add a language entry. </paragraph> 72<paragraph role="paragraph" id="par_id7811822" xml-lang="en-US" l10n="NEW">This step enables all new dialogs to contain localizable string resources.</paragraph> 73</listitem> 74<listitem> 75<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> 76<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> 77</listitem> 78<listitem> 79<paragraph role="paragraph" id="par_id3808404" xml-lang="en-US" l10n="NEW">Select a language. </paragraph> 80<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> 81</listitem> 82<listitem> 83<paragraph role="paragraph" id="par_id2394482" xml-lang="en-US" l10n="NEW">Close the dialog or add additional languages.</paragraph> 84</listitem> 85</list> 86<paragraph role="heading" id="hd_id631733" xml-lang="en-US" level="2" l10n="NEW">To edit localizable controls in your dialog</paragraph> 87<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> 88<list type="ordered"> 89<listitem> 90<paragraph role="paragraph" id="par_id8956572" xml-lang="en-US" l10n="NEW">Switch the Current Language listbox to display the default language.</paragraph> 91</listitem> 92<listitem> 93<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> 94</listitem> 95<listitem> 96<paragraph role="paragraph" id="par_id8366649" xml-lang="en-US" l10n="NEW">Select another language in the Current Language listbox.</paragraph> 97</listitem> 98<listitem> 99<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> 100</listitem> 101<listitem> 102<paragraph role="paragraph" id="par_id2655720" xml-lang="en-US" l10n="NEW">Repeat for all languages that you added.</paragraph> 103</listitem> 104</list> 105<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> 106<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> 107<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> 108<section id="relatedtopics"> 109<embed href="text/sbasic/guide/create_dialog.xhp#create_dialog"/> 110<embed href="text/sbasic/guide/insert_control.xhp#insert_control"/> 111<embed href="text/sbasic/guide/show_dialog.xhp#show_dialog"/> 112<embed href="text/sbasic/guide/sample_code.xhp#sample_code"/> 113</section> 114</body> 115</helpdocument> 116