Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

What is `displayNameKey` in capabilities.json ?

Hello,

 

 To do my cuom visuals, I enter some object properties in capabilities.json in this way:

 

"objects": {
  "ggsettings": {
    "displayName": "Chart Settings",
    "description": "Chart settings",
    "properties": {
      "Smoothing": {
        "displayName": "Smoothing",
        "description": "Add smoothing",
        "type": {
          "bool": true
        }
      },

 

I have seen some examples with a displayNameKey field:

 

"objects": {
  "ggsettings": {
    "displayName": "Chart Settings",
    "description": "Chart settings",
    "properties": {
      "Smoothing": {
        "displayName": "Smoothing",

        "displayNameKey": "XXXXXXXXXXX"
        "description": "Add smoothing",
        "type": {
          "bool": true
        }
      },

 

What is the role of this field?

1 Reply

  • dm-p's avatar
    dm-p
    Super User

    displayNameKey (as well as descriptionKey and placeholderTextKey) is used to define a lookup value for localisation within visuals.

    Note that if building this in, you need to package your visual to test that lookups work correctly, as stringResources/localisation keys are not supplied to the developer visual when debugging.