---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: Extend
nav: wcp_docs
parent_url: /wcp_docs/
title: Translate Widgets Using the Workday Extend Plugin for IntelliJ
layout: subsection
---

### Prerequisites

<a id="prereq_N10021_N1001E_N10001"></a>
-   Workday Extend Plugin for IntelliJ.
-   Security: <i>Manage: App Manager</i> domain in the System functional area.


### Context

<a id="context_N10051_N1001E_N10001"></a>
You can assign language translation keys to widget labels, values, and titles in your PMDs. In particular, you can translate hard-coded values on these tag attributes:

-   `label`
-   `title`
-   `value`


<b>Language Translation File</b>

A language translation file is a `.properties` file located in the `presentation/presentationLabels` folder of a custom app, and contains the translation keys you've created in your app. A language file follows this file-naming convention:

`<language-code>-<country-code>.properties`

Where `<language-code>` is the standard ISO 639-1 language code, and `<country-code>` is the standard ISO-3166-1 country code. Example: `en-US.properties`

Each line in a language file contains `<key>=<value>` pairs, where `<key>` is the translation key, and `<value>` is the translation value. Example:

```
greeting=Hello
welcomeMessage=Welcome to Workday Extend! 
```

If `<value>` requires multiple lines in the file, end each line with `\`. The multiple lines display as 1 line on the page. You can include the `=` character in the translated value.

The language file becomes part of your app artifact when you upload your app to App Hub.

<b>Note:</b> The `.properties` file has a maximum file size of 100 KB.

<b>Multiple Language Files</b>

If your app needs to support multiple languages, your app must have a default language file (such as `en-US.properties`) and a language file for each supported language. Use UTF-8 encoding format for the files and when writing labels.

Although you can create language files using the Workday Extend Plugin for IntelliJ, you can also create language files from external sources. Example: You can create a language file using the <b>Business Objects Translations</b> report for External Labels. You can also create a language file by copying an existing language file in your app. After you paste it in your app, rename it with the correct language code. All language files must:

-   Follow the file-naming convention `<language-code>-<country-code>.properties`.
-   Contain translation keys and values using the `<key>=<value>` format on each line.
-   Be in the `presentation/presentationLabels` subfolder of your app.
-   Use the same set of translation keys across the language files.
-   Have a language code entry in the `languages[]` property in the Site Metadata (`.smd` file) of your app.


All language files in `presentation/presentationLabels` become part of your app artifact when you upload your app to App Hub.

<b>Translation Key Bindings in the PMD</b>

The PMD tag attributes with translation keys use this translation key binding:

```
<% presentationLabels.<translationKey> %>
```

This sample `text` tag uses translation key bindings on the `label` and `value` attributes:

```
{
   "type" : "text",
   "label" : "<% presentationLabels.greeting %>",
   "value" : "<% presentationLabels.welcomeMessage %>"
}
```

If you create language files from an external source, ensure that the PMD tag attributes use translation key bindings. Also ensure that the translation keys in the bindings match the keys in the language file.

This procedure assumes that you haven't yet created a language file.

### Steps

1.  <a id="step_N1005F_N1005C_N1001E_N10001"></a>Open your custom app in IntelliJ.
2.  <a id="step_N100A3_N10097_N10029_N10001"></a>Open the first PMD that requires widget label translation.
3.  <a id="step_N1006C_N1005C_N1001E_N10001"></a>In a tag definition, right-click on the hard-coded value of any of these attributes:

    -   `label`
    -   `title`
    -   `value`

4.  <a id="step_N100F2_N100B5_N1003B_N10001"></a>From the right-click menu, select <b>Create translation key</b>.

    You can only create translation keys with hard-coded values. You can't translate binding values.

5.  <a id="step_N1007D_N1005C_N1001E_N10001"></a>Enter a unique translation key.

    The translation key identifies the label value in the language file. The hard-coded value becomes the base value of the label.

6.  <a id="step_N1008A_N1005C_N1001E_N10001"></a>Select a language.
7.  <a id="step_N10198_N10137_N10035_N10001"></a>Click <b>OK</b>.

    The Workday Extend Plugin for IntelliJ creates a language file in the `presentation/presentationLabels` subfolder of your app. The language file uses the language code that you selected, and contains the translation key you created.

    In the PMD, the Workday Extend Plugin for IntelliJ replaces the hard-coded value with a binding of the `presentationLabels` and the translation key. Example: `"<% presentationLabels.sampleTranslationKey %>"`

8.  <a id="step_N100BB_N10071_N1001E_N10001"></a>Create a translation key for all other hard-coded labels, titles, and values in your PMDs that need translation.
9.  <a id="step_N101CE_N10137_N10035_N10001"></a>Enter the translation values in the language file.
    1.  Open the language file in the `presentation/presentationLabels` subfolder of your app.
    2.  Enter the translation values for all the translation keys you created.

10. <a id="step_N100DC_N10085_N1001F_N10001"></a>Open the SMD, and find the `languages[]` property. Add the language code for each language translation.

    This sample SMD snippet contains the English and Spanish languages:

    ```
      "languages" : [{
        "code" : "en-US",
        "description" : "English"
      }, {
        "code" : "es-ES",
        "description" : "Castillan Spanish"
      }],
    ```

11. <a id="step_N100E8_N1005C_N1001E_N10001"></a>Upload the app to App Hub.
12. <a id="step_N100DD_N1007D_N1001E_N10001"></a>Deploy the app to the tenant.


### Result

<a id="result_N10143_N1001E_N10001"></a>
When an app user signs in to the tenant and changes preferences to a translated language, the app user sees the pages with translated values.

