Go to: Synopsis. Return value. Related. MEL examples.

Synopsis

pluginResourceUtil(string $pluginName, string $outputFile)

This utility script extracts localizable resources for a plugin to an output file.

The procedure will produce a script file containing the default resource values for all resources registered with the plugin. This includes all MStringResource values registered in the plugin source code, the localizable node and attribute strings for each node registered with the plugin and all plugin resources registered in mel scripts (using registerPluginResource) The extracted resources can then be localized and the resulting file will be suitable for use with the loadPluginLanguageResources command.

Note that the script only runs if the UI language is set to the English default (it will not produce the desired default values when running in a localized setting).

Return value

None

Related

getPluginResource, loadPluginLanguageResources, registerPluginResource, setPluginResource

Arguments

Variable Name Variable Type Description
$pluginNamestringUnique Plugin name (as passed to loadPlugin)
$filenamestringfile name for redirection of output (or "")

MEL examples

  // Extract localizable resources for the plugin "myPlugin" 
  // and store them in the file "myPlugin.pres.mel" 
  // 
  pluginResourceUtil("myPlugin", "myPlugin.pres.mel")

  // Show all localizable resources for the plugin "myPlugin" 
  // but do not redirect the output to a file. 
  // 
  pluginResourceUtil("myPlugin", "")