LocalizeMenuBar

int LocalizeMenuBar (int menuBarHandle, const char *languageResourceFile);

Purpose

This function applies the translated strings in the language resource file (*.lwl) to the specified menu bar.

You have to regenerate the language resource file (*.lwl) when you add menus or menu items to the specified menu bar.

Use the platform SDK function GetLocaleInfo to get the system or user default language.

Parameters

Input
Name Type Description
menuBarHandle integer The specifier used to reference the menu bar.

This handle will have been returned by the LoadMenuBar, GetPanelMenuBar, or NewMenuBar; or, if the menu bar was automatically loaded through LoadPanel, use GetPanelMenuBar to get the menu bar handle.
languageResourceFile const char * This file contains translated strings for the specified menu bar.

Return Value

Name Type Description
status integer Indicates whether the function was successful.

A zero indicates success.

A negative value indicates an error. If the value is from –1 to –999, it is one of the error values defined in userint.h. Otherwise, it is one of the error values defined in toolbox.h. Use GetGeneralErrorString in the toolbox to get a description.

Among the more commonly encountered errors are:

–12 Out of memory!
–91 Too many files are open.
–93 Input/Output error.
–94 File not found.
–95 File access permission denied.
–97 Disk is full.
–99 File already open.
–100 Badly formed pathname.
–6000 Invalid or corrupt language file