# Translate Display\[\] attribute

**URL:** <https://forum.opentap.io/t/translate-display-attribute/2651>\
**Category:** General\
**Tags:** opentap-sdk\
**Created:** [February 19, 2026, 3:16pm UTC](https://forum.opentap.io/t/translate-display-attribute/2651 "2026-02-19T15:16:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fauser](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@fauser](https://forum.opentap.io/u/fauser)\
**Post date:** [February 19, 2026, 3:16pm UTC](https://forum.opentap.io/t/translate-display-attribute/2651/1 "2026-02-19T15:16:53Z")

</div>

How can I load the translated name directly from my resources.resx file?  
`[Display(Name:“Selection”, Description:“Description”)]`

I thought I could just translate it like that, but unfortunately it doesn’t work. Is there a better way?  
`[Display(Name: Resources.Selection, Description:“Description”)]`

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [February 20, 2026, 9:30am UTC](https://forum.opentap.io/t/translate-display-attribute/2651/2 "2026-02-20T09:30:44Z")

</div>

Hi @fauser,

This is possible with reflection, but why do you need to get the translated Display attribute?

Here is how this can be done (although I suspect you actually want something else):

```cs
var translatedName = TypeData.GetTypeData(myObject).GetMember("myMember").GetTranslatedDisplayAttribute().Name;

```

---

<div class="post-metadata">

**Author:** ![fauser](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@fauser](https://forum.opentap.io/u/fauser)\
**Post date:** [February 23, 2026, 2:39pm UTC](https://forum.opentap.io/t/translate-display-attribute/2651/3 "2026-02-23T14:39:02Z")

</div>

But how do I then link that to my resource file?

```csharp
using OpenTap;
using System.Globalization;
using System.Security.AccessControl;

[Display(“MyStep”, Group: “Examples”, Description: “Ein Beispiel-Testschritt mit Übersetzung”)]
public class MyStep : TestStep
{
[Display(Name : “MyProperty_Name”)]
public string MyProperty { get; set; }

public override void Run()
{
    var typeData = TypeData.GetTypeData(this);

    var memberData = typeData.GetMember(nameof(MyProperty));

    var translatedDisplay = memberData.GetTranslatedDisplayAttribute();

    Console.WriteLine($"Anzeigename (übersetzt): {translatedDisplay.Name}");
}

}

```

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/2X/9/90500411f684a06b425d11b7a006d4e78351802b.png)

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [February 23, 2026, 2:42pm UTC](https://forum.opentap.io/t/translate-display-attribute/2651/4 "2026-02-23T14:42:07Z")

</div>

Did you see the documentation topic relating to translation? [Translating Packages | OpenTAP](https://doc.opentap.io/Developer%20Guide/Translating/Readme.html#do-live-translation-with-ks8400)

If you have a package for your test steps, it should be easy enough to write translations. You can also add translations for packages that you did not author yourself.

---

<div class="post-metadata">

**Author:** ![fauser](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@fauser](https://forum.opentap.io/u/fauser)\
**Post date:** [February 24, 2026, 8:50am UTC](https://forum.opentap.io/t/translate-display-attribute/2651/5 "2026-02-24T08:50:35Z")

</div>

Yes, but the documentation only applies if you have a TapPackage.

However, I want a central resource file for all my custom test steps in Visual Studio (as shown in the previous screenshot).

So basically, I’m creating an .exe file, not a .TapPackage.

I want my TestStep to be directly linked to the “Resource File” from my project, so I don’t have to create it first with `tap sdk translate`.

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [February 24, 2026, 10:14am UTC](https://forum.opentap.io/t/translate-display-attribute/2651/6 "2026-02-24T10:14:18Z")

</div>

If you put the resx file inside: `[TAP folder]/Languages/Resource.de.resx`

Then inside the Engine settings you will get the following option:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/2X/0/02e21b63226746098cc8129959b917d74bd28434.png)

There are some requirements to the naming inside the resx file, but if you do `tap sdk translate OpenTAP` and look at the result, i think you can get an idea of it. Here is an example:

```xml
 <data name="OpenTap.Plugins.BasicSteps.DelayStep.DelaySecs.Name" xml:space="preserve">
    <value>Time Delay</value>
  </data>

```

---

<div class="post-metadata">

**Author:** ![fauser](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@fauser](https://forum.opentap.io/u/fauser)\
**Post date:** [April 29, 2026, 12:26pm UTC](https://forum.opentap.io/t/translate-display-attribute/2651/7 "2026-04-29T12:26:37Z")

</div>

Here is the rule for how the key/name must be created in the resource file!

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/2X/4/45646ba6319157faeb49ce3effb0e425880b719e.png)
