Select to view content in your preferred language

How to use language resources in a DAML file?

1375
1
Jump to solution
06-23-2021 09:26 AM
ChristianJ1979
Emerging Contributor

Hello,

i use the ArcGIS Pro 2.7 SDK to create a small AddIn. In the DAML file i defined a button in a module like so:

    <insertModule id="LFB_MetadataAddIn" className="HandleExportDocuments" autoLoad="true" caption="LFB.MetadataAddIn">
      <controls>
		  <!-- How to add a custom image to the button: https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources 
		       Used images as resources here because the are easier to use in code: https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources#images-as-resources -->
        <button id="LFB_MetadataAddIn_SaveMetadataDocumentToDiskButton" caption="{x:Static Resources.ButtonCaption_SaveMetadataPDF}" className="SaveMetadataDocumentToDiskButton" loadOnClick="true" smallImage="pack://application:,,,/LFB.MetadataAddIn;component/Images/pdf16.png" largeImage="pack://application:,,,/LFB.MetadataAddIn;component/Images/pdf32.png">
          <tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip>
        </button>
      </controls>
    </insertModule>

It works as expected. So now i like to set the caption and tooltip of this button with a string from a resource file like in a XAML file. Is there a way to do this in the DAML file?

With {x:Static Resources.ButtonCaption_SaveMetadataPDF} it does not work.

 

Regards

 

Christian

0 Kudos
1 Solution

Accepted Solutions
KrisCulin
Frequent Contributor

See the ArcGIS Pro SDK wiki page specifically about localization.

Here is a link for you.

ProConcept Localization · Esri/arcgis-pro-sdk Wiki · GitHub

Kris

View solution in original post

1 Reply
KrisCulin
Frequent Contributor

See the ArcGIS Pro SDK wiki page specifically about localization.

Here is a link for you.

ProConcept Localization · Esri/arcgis-pro-sdk Wiki · GitHub

Kris