l10n Package

l10n Package

bindings Module

Helper classes for internationalization of the messages for static bindings

class vmware.vapi.l10n.bindings.MessageArgumentConverter[source]

Bases: object

Utility class for converting localizable message arguments to strings

static to_string(args)[source]

Convert argument list to string argument list

Parameters:args (list of object) – List of arguments
Return type:list of str
Returns:List of string arguments

bundle Module

Helper classes for creation of resource bundles

class vmware.vapi.l10n.bundle.DictionaryResourceBundle(msgs)[source]

Bases: vmware.vapi.message.MessageBundle

Class for creating resource bundles using dictionary of messages

Initialize DictionaryResourceBundle

Parameters:msgs (dict) – Message bundle
class vmware.vapi.l10n.bundle.FileMessageBundle(message_files)[source]

Bases: vmware.vapi.message.MessageBundle

Class for creating resource bundles using list of files that contain messages

Initialize FileMessageBundle

Parameters:message_files (list of str or str) – List of message files to be processed. Each element in the list should be a fully qualified file path.
class vmware.vapi.l10n.bundle.PropertiesResourceBundle(property_files)[source]

Bases: vmware.vapi.message.MessageBundle

Class for creating resource bundles using property files in the distributable. i.e. egg or zip file.

Initialize PropertiesResourceBundle

Parameters:property_files (list of tuple or tuple) – List of property files to be processed. The tuple should be of the form (package, resource_name). For ex: If a file named runtime.properties is present in vmware.vapi package, the tuple to be passed is (‘vmware.vapi’, ‘runtime.properties’)

constants Module

Constants for localization

formatter Module

Helper classes for formatting the message for localization

class vmware.vapi.l10n.formatter.StringFormatter[source]

Bases: vmware.vapi.message.MessageFormatter

Format the string

classmethod format_msg(msg, args)[source]

Format the string

  • msg (str) – Message template
  • args (list of object) – Arguments for the message
Return type:



Localized message

format_specifier = <_sre.SRE_Pattern object at 0x8dfd530>
string_template = <_sre.SRE_Pattern object at 0x8dfcfa8>

runtime Module

Helper class for internationalization of the runtime messages


Default message factory. Load the runtime message bundle from the egg file

Return type:vmware.vapi.message.MessageFactory
Returns:Message factory class for the runtime


Table Of Contents

Previous topic

debug Package

Next topic

lib Package

This Page