### Navigation

- index
- modules |
- next |
- previous |
- vSphere Automation SDK for Python 6.5.0 documentation »
- vmware Package »
- vapi Package »

# l10n Package

## `l10n` Package

## `bindings` Module

Helper classes for internationalization of the messages for static bindings

class `vmware.vapi.l10n.bindings.``MessageArgumentConverter`

  Bases: `object`

  Utility class for converting localizable message arguments to strings

  static `to_string`(args)

    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)

  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)

  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)

  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`

  Bases: `vmware.vapi.message.MessageFormatter`

  Format the string

  classmethod `format_msg`(msg, args)

    Format the string

    Parameters: | msg (`str`) – Message template args (`list` of `object`) – Arguments for the message
    Return type: | `str`
    Returns: | 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

`vmware.vapi.l10n.runtime.``get_runtime_message_factory`()

  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

## Subpackages

### Navigation

- index
- modules |
- next |
- previous |
- vSphere Automation SDK for Python 6.5.0 documentation »
- vmware Package »
- vapi Package »