Keyboard Layout System Tray Widget Enhancement

I would like the Keyboard Layout widget to be able to distinguish between two layouts in the same language, possibly with custom labels.

I use two layouts: “English (US)” and “English (US), intl, with dead keys”. I love being able to easily switch with a custom keyboard shortcut, but the label that both these layouts use in the System Tray just says “US”. It would be nice if there was a better distinction between the two, e.g. “US” and “US/intl.” Something to distinguish the two layouts rather than just the language.

One way I can imagine to fix this is by adding custom labels to each configured layout - someone would need to implement this.

For now the only way I see to do this is to copy/link the layout to a user configured one, e.g
$ cp /usr/share/X11/xkb/symbols/us ~/.xkb/symbols/ud

then create a ~/.xkb/rules/evdev.xml with something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xkbConfigRegistry SYSTEM "xkb.dtd">
<xkbConfigRegistry version="1.1">
  <layoutList>
    <layout>
      <configItem>
        <name>US-copy</name>
        <shortDescription>ud</shortDescription>
        <description>US-Copy</description>
      </configItem>
      <variantList>
        <variant>
          <configItem>
            <name>intl</name>
            <shortDescription>udi</shortDescription>
            <description>Copy of US-Intl</description>
          </configItem>
        </variant>
      </variantList>
    </layout>
  </layoutList>
</xkbConfigRegistry>

Then configure the copy as the second layout.

I have not tested this, but something like this should work - at least on wayland. On X11 you would need to do all this within /usr/share/X11/xkb.
You might need to re-log-in to kde.