Each service provides a link that an administrator can use to upload a new or modified localization bundle for the service.

A localization bundle is a file in ZIP format that contains one or more localized message files that your service uses. Each line in one of these files provides localized text that replaces the text that your service posts in the values of certain attributes for service-specific events and tasks. See Message File Content.

This operation is restricted to system administrators.

Create a localization bundle.

1

Create a localization bundle.

2

Find the localizationbundles URL for your service.

a

Retrieve the XML representation of the service.

b

Examine the representation for a Link of the following form:

<vcloud:Link
   rel="bundle:upload"
   type="application/vnd.vmware.admin.bundleUploadParams+xml"
   href="https://vcloud.example.com/api/admin/extension/service/45/localizationbundles" />

The localizationbundles URL is the value of the href attribute of this link.

3

Create a BundleUploadParams element that specifies the size of the bundle and the service namespace of the service.

4

POST the BundleUploadParams element to the localizationbundles URL of your service.

This example uploads a localization bundle for the service created in Example: Register an Extension Service. The initial request specifies the size of the ZIP file in bytes and the name of the service namespace.

Request:

POST https://vcloud.example.com/api/admin/extension/service/45/localizationbundles
Content-type: application/vnd.vmware.admin.bundleUploadParams+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<vmext:BundleUploadParams
   xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
   xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
   fileSize="537"
   serviceNamespace="org.example.vcd.backup">
</vmext:BundleUploadParams>

The response body includes an uploadLocation URL. You can use a procedure similar to the one in Example: Uploading File Data to upload the ZIP file to this location.

Response:

<vmext:BundleUploadSocket
   uploadLocation="https://vcloud.example.com/transfer/6f3b.../file"
   xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
   xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
</vmext:BundleUploadSocket>

To update a bundle, follow the same procedure using a new bundle that contains updated message files. When you upload a new localization bundle for a service that already has one, new key=value pairs are added, and the values of existing keys are updated.