Go to: Synopsis. Return value. MEL examples.

Synopsis

localizedPanelLabel( string $englishPanelLabel )

When running Maya in a localized environment, panel and layout names are also localized and could cause scripts relying on English names to behave differently. Use this procedure to obtain the localized versions of panel labels like "Top View" and "Persp View", window names like "Outliner" and "Graph Editor", and configuration/layout names like "Persp/Outliner" and "Three Panes Stacked".

Return value

None

MEL examples

		// This command returns a non-null result when running in English.
		//
 		$panel = `getPanel -withLabel "Graph Editor"`;
		// Result: graphEditor1 //

		// But the same command returns a null result when running in another language.
		//
		$panel = `getPanel -withLabel "Graph Editor"`;
 		// Result: // 

		// In order to find the graphEditor panel by its label, "getPanel -withLabel"
		// must be passed the name of the Graph Editor in the localized language.  But
		// hard-coding the localized name for one language means the script will fail 
		// for other localizations, so one way to guarantee consistent script behaviour
		// across languages is to use localizedPanelLabel().
		// 
		$panel = `getPanel -withLabel (localizedPanelLabel("Graph Editor"))`;
		// Result: graphEditor1 //