# Toolbar Item Internationalization Issue

**URL:** <https://forum.inductiveautomation.com/t/toolbar-item-internationalization-issue/98126>\
**Category:** Module Development\
**Created:** [November 4, 2024, 3:18pm UTC](https://forum.inductiveautomation.com/t/toolbar-item-internationalization-issue/98126 "2024-11-04T15:18:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [November 4, 2024, 3:18pm UTC](https://forum.inductiveautomation.com/t/toolbar-item-internationalization-issue/98126/1 "2024-11-04T15:18:02Z")

</div>

I am not exactly sure if I am missing something obvious here,

But in trying to add in a toolbar menu item, I have found that the internationalization for it is acting a bit funny.

I have a bundle I am adding in during my designer hook startup:

```python
BundleUtil.get().addBundle("projectscan", this.getClass(), "designer");

```

To pull values out of it for the UI in general I am using the following syntax:

```python
BundleUtil.get().getString("projectscan.Action.ScanProject.Description")

```

That is working great for that description being used as a tooltip:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/2/425ed227f65b145e788465b02cd44326982dd6b1.png)

Here is the action that was used in:

```python
 public ProjectScanAction(DesignerContext context, Icon icon) {
        super(BundleUtil.get().getString("projectscan.Action.ScanProject.Name"), icon);
        this.context = context;
        putValue(SHORT_DESCRIPTION, BundleUtil.get().getString("projectscan.Action.ScanProject.Description"));
        logger.info("Project Scan Action initialized");
    }

```

However on the actual toolbar name itself, it seems that maybe some double localization is attempting to happen here? because the text comes through localized by whatever I put in the `.properties` file, but always has the `?`s around it. Then if I set it to something not in the properties file, I get double `??`s around it? Which makes it feel like it's trying to localize what I have already localized.

So if I remove the `BundleUtil.get().getString(` call in the toolbar title, everything is totally normal and no `?`s?

I mean, I figured it out eventually, but how could I have known that this piece of text would attempt to localize without having to use BundleUtils, and am I doing localization in a weird way? or is this what's expected?

This is the one that double-localizes

```python
DesignerToolbar toolbar = new DesignerToolbar(
            "ProjectScan",
            BundleUtil.get().getString("projectscan.Toolbar.Name")
        ); 

```

This one only localizes one time:

```python
DesignerToolbar toolbar = new DesignerToolbar(
            "ProjectScan",
            "projectscan.Toolbar.Name"
        ); 

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 4, 2024, 4:22pm UTC](https://forum.inductiveautomation.com/t/toolbar-item-internationalization-issue/98126/2 "2024-11-04T16:22:46Z")

</div>

> [@kgamble](#):
>
> how could I have known that this piece of text would attempt to localize without having to use BundleUtils

The constructor args are named `name` and `titleKey`:

> **[DesignerToolbar](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.44/com/inductiveautomation/ignition/designer/gui/DesignerToolbar.html#%3Cinit%3E(java.lang.String,java.lang.String))**
>
> declaration: package: com.inductiveautomation.ignition.designer.gui, class: DesignerToolbar

That's...basically all you get, since strings are strings are strings. If we name a parameter "key", we're going to rinse it through localization for you. There's no consistent standard on whether a component will do its own localization or expect you to pass localized strings.

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [November 4, 2024, 7:03pm UTC](https://forum.inductiveautomation.com/t/toolbar-item-internationalization-issue/98126/3 "2024-11-04T19:03:50Z")

</div>

Actually found this in the docs too, for anyone in the future

> **[Localization | Ignition SDK Programmer's Guide](https://www.sdk-docs.inductiveautomation.com/docs/getting-started/key-design-concepts/localization/)**
>
> Localization adapts an application to present information in a way consistent with what users in different countries are accustomed to, such as date formatting. Ignition supports localization. It is fairly easy for module developers to adapt their...
