# Get DButton @label attribute to display properly

**URL:** https://meta.discourse.org/t/get-dbutton-label-attribute-to-display-properly/269262
**Category:** Development
**Created:** [June 22, 2023, 12:21pm UTC](https://meta.discourse.org/t/get-dbutton-label-attribute-to-display-properly/269262 "2023-06-22T12:21:36Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [June 22, 2023, 12:46pm UTC](https://meta.discourse.org/t/get-dbutton-label-attribute-to-display-properly/269262/2 "2023-06-22T12:46:48Z")

</div>

You are attempting to use a string. But I don’t believe that’s supported.

You should be providing a localisation key which is linked to a string.

See:

> [@Add localizable strings to themes and theme components](https://meta.discourse.org/t/add-localizable-strings-to-themes-and-theme-components/109867):
>
> For those looking to add custom languages and translations to a Discourse theme or theme component, they [can now include](https://github.com/discourse/discourse/commit/880311dd4d2b367e54cc8244fba60fce69e121c3) localised strings, which are made available for use in UI components. Translations are stored in the same format as core/plugin translations, and can be used in almost the same way. Themes can supply translation files in a format like /locales/{locale}.yml. These files should be valid YAML, with a single top level key equal to the locale being defined. These can be defined us…

Just look inside a popular plugin for guidance on how to do this in a plugin.

In general always look for examples of what you are trying to do in existing source code.

---

_[View the full topic](https://meta.discourse.org/t/get-dbutton-label-attribute-to-display-properly/269262)._
