Excel-DNA / IntelliSense

Add in-sheet IntelliSense for Excel UDFs
MIT License
170 stars 52 forks source link

Allow (Excel) language dependent XML files #82

Open Mo-Gul opened 5 years ago

Mo-Gul commented 5 years ago

It would be nice if there would be a possibility to provide IntelliSense texts that correspond to the current Excel language, e.g. English or German.

konne commented 5 years ago

ExcelDNA already supports multi language resx files, so for me the best way would be to reference in the Attributes to an resxkey

govert commented 5 years ago

For an Excel-DNA add-in, using the Registration extension library should already allow this to be built easily as a transformation of the attributes during the registration. For a VBA add-in it might be possible by rewriting the xml file at runtime to contain the right descriptions for the active language, and then calling the hidden IntelliSense 'refresh' macro.

@Mo-Gul I think you have a VBA add-in - is that right? Would re-writing the intellisense xml file at runtime be a way to make this work for you?

Mo-Gul commented 5 years ago

@govert, you are absolutely right. I have a VBA-AddIn. Unfortunately I don't have a clue about Excel-DNA, C#, VB.NET, or F# programming. So as long as the your suggested solution works with only knowing VBA stuff and some instructions on how to make stuff work, I'll live with any solution you provide.

And because I am unable to help directly in programming a solution the only thing I can offer is testing and prove-reading manuals.

Mo-Gul commented 5 years ago

For a pure Excel solution, here a suggestion:

When I import the XML file

XML file

```xml ```

I get

Excel: imported XML file from above

Slightly modifying it

results almost in the following screenshot.

resorted XML import

Assuming that only the argument description will be language dependent it would be easy to append the Description by _<msoLanguageIDUI> (Application.LanguageSettings.LanguageID(msoLanguageIDUI), e.g. for German it will be 1031. Additional languages could then easily be added after the Length column.

This new layout would have several advantages, if the Intellisense-AddIn could be modified to read it:

Function Wizzard Screenshot