大网数据广告活动
安装更新与部署

Localizing Database Columns

· 52CE 我爱测

Modify any of the other localizable columns in the MNPFren.msi database using a table editor such as Orca or SQL queries.

Modify any of the other localizable columns in the MNPFren.msi database using a table editor such as Orca or SQL queries. To determine which columns of a particular table may be localized to another language, see the reference topic for that database table. See Database Tables for a list of all database tables.

For example, the Text field of some records in the Control table may need to be localized into French. The string "Are you sure you want to cancel [ProductName] installation?" in the Cancel Dialog may be modified in this table to be displayed in French. The original record in .msi file appears as follows.

Control Table (partial) of the original .msi file

Dialog_ Control Type X Y Width Height Attributes Property Text Control_Next Help
CancelDlg Text Text 48 15 194 30 3 Are you sure you want to cancel [ProductName] installation?

You may use a table editor to modify the Text field, such as the Orca table editor provided with the SDK or another table editor, or use a SQL query to change the Text field of the Control table record. An example demonstrating script-driven database queries is provided in the Windows Installer SDK as the utility WiRunSQL.vbs. Use the following command line to modify the field with WiRunSQL.vbs and the Windows Script Host. See also Examples of Database Queries Using SQL and Script.

Cscript WiRunSQL.vbs MNPFren.msi "UPDATE Control SET Control.Text='Etes-vous sur de vouloir annuler l'installation de [ProductName]?' WHERE Control.Dialog_='CancelDlg' AND Control.Control='Text'"

Control Table (partial) in MNPFren.msi

Dialog_ Control Type X Y Width Height Attributes Property Text Control_Next Help
CancelDlg Text Text 48 15 194 30 3 Êtes-vous sûr de vouloir annuler l'installation de [ProductName]?

If the installation of MNPFren.msi is canceled by the user, the Cancel Dialog appears displaying the text: "Êtes-vous sûr de vouloir annuler l'installation de MNP2000?"

When using this method to localize UI text to a different language, the localized UI must be tested to ensure that the size of controls are large enough to display the entire localized text. This should be tested using all font size settings that are available for display. Localized text can require more space than the original text and may be truncated if displayed in a control that is too small.

Continue

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。