# LoadLocalizedPanel

int LoadLocalizedPanel (int parentPanel, const char *panelResourceFile, int panelResourceID, const char *languageResourceFile, int *panelHandle);

## Purpose

This function is similar to LoadPanel, except that it applies the translated strings in the language resource file (*.lwl) to the specified panel.

See LoadPanel help for more information.

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

## Parameters

Input
Name | Type | Description
parentPanel | integer | The handle of the panel into which the new child panel is loaded. To make the panel a top-level panel, enter 0. This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function.
panelResourceFile | const char * | The name of the User Interface Resource file (*.uir) or the Text Format User Interface file (*.tui) that contains the panel. You can use a complete pathname or a simple filename. If the name is a simple filename (i.e., contains no directory path) and the file is listed in the project, then the file is loaded using the pathname from the project. If the name is a simple filename but the file is not listed in the project, then the file is loaded from the directory containing the project.
panelResourceID | integer | If the specified file is a User Interface Resource (*.uir) file, the panelResourceID is the defined constant that was assigned to the panel in the User Interface Editor. The panel resource ID can be found in the UIR header file. If the file is a Text Format User Interface (*.tui) file, the panelResourceID is the header number of the .tui file section in which the panel is defined. For example, if the section header for the desired panel is [Panel003], then the panelResourceID is 3. LoadPanel loads all of the controls in the .tui file whose section headers are of the form [PanelNNN_ControlYYY], where NNN is the panelResourceID, and YYY is 001 or greater. The control numbers must be consecutive and start at 001. To pass a Control ID to other User Interface Library functions, pass YYY + 1. For instance, if the section header is [Panel003_Control001] for a control on which you want to set an attribute value, pass 2 as the Control ID to the SetCtrlAttribute function. If you save a .tui file in the User Interface Editor in LabWindows/CVI 5.0 or later, and you have an up-to-date include (.h) file generated by the User Interface Editor, you can use the panel, control, menu bar, menu, and menu item constants in the include file as parameters to User Interface Library functions. The panelResourceID is used only once to load the panel into memory. Subsequent function calls refer to this panel with the Panel Handle returned by this function.
languageResourceFile | const char * | This file contains translated strings of the strings in the panel resource file.
Output
Name | Type | Description
panelHandle | integer * | The value which you must use in subsequent function calls to specify this panel. Zero is not a valid panel handle. Use DiscardPanel to discard.

## 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