OfficeJs EntityValue Data Type Translations

OfficeJs EntityValue Data Type Translations
0

Upvotes

Upvote

 Mar 25 2024
0 Comments 
New

Custom data types in Excel OfficeJs applications allow you to create rich objects that can be returned from, and consumed by, your custom functions in Excel add-ins. This is some pretty neat functionality but has a limitation with respect to translated properties. Excel Data Types 

 

As a software provider, I might want to create a set of workbooks that can be accessible to any number of customers around the world. Presently, I would need to manufacture a workbook for every language I want to support. I would like to be able to configure an entity's property with a set of captions selected based on the user's current locale.

 

This should work both for simply showing the data (ie, in the Entity Card and worksheet when referenced) as well as when using the auto-complete functionality in the worksheet.

 

An example of how this could work is letting entities be defined as they are right now where the properties contains a default/fallback caption. Data Type Properties 

The Excel.CellValuePropertyMetadata object could then be extended to include a Captions property, keyed by locale with a localized caption string value. Property Metadata 

 

If no caption is supplied for the current locale, the default property key/name is used as it currently is.