Translating tooltips in both AutoCAD and Revit using .NET

A quick update, today. Last week Jeremy posted a migrated version of the TransTips plug-in for AutoCAD, this time working inside Revit. Thanks to the shared use of AdWindows.dll in both products, this was actually really easy.

After this initial version, it made sense to refactor the code to have a core, shared file (not necessarily a separate DLL component โ€“ sharing source can give many benefits for smaller projects, such as this) used to build plugin DLLs for both AutoCAD and Revit.

Here's the result: a single solution which will build TransTips DLLs for AutoCAD and Revit (including built versions of the DLLs). I won't go into the specific details, here, although I did do as promised with regards to checking for network availability: if the app doesn't manage to contact the Bing Translate service, it continues to work in offline mode, picking up translations from local XML files, where available. It's also possible to specify this mode by default (with a very minor code change).

Otherwise the code itself should be reasonably straightforward. I used the "Add Existing Item โ€“> Add Link" capability in VS 2010 to maintain a common file across both projects in the solution, which was new to me, and gave me exactly the project structure I was after.

In the next post in this series: support for Inventor (that one's for you, Alex ๐Ÿ˜‰ and additional work to share a common, WPF-based language selection UI across all the projects. At some point, beyond, I'll also look at an editing capability for the XML data (also shared), and perhaps even some true componentization. We'll see about that, though โ€“ in many ways I quite like the current approach of building a single DLL per-product.

4 responses to “Translating tooltips in both AutoCAD and Revit using .NET”

  1. Hi Kean,

    I'm a regular of both blogs, Jeremy's and yours.

    Switching between different ToolTip localizations is a funny thing, but where is the advantage if the other UI elements remain in their former language ?

    The next lines refer more to Revit, but you easily can replace Revit with AutoCAD:

    It would be interesting to know how to change the text of *any* UI element (e.g. RibbonItems, title of a dialog, category names in the Project Browser tree or property names in the property sheet).

    If it would be possible to change the UI texts at runtime, Autodesk could simplify the delivering process.

    Okay, I know that there is special content for different countries (RTEs, RFTs), but the main program stays the same, as far as I can see.
    What about delivering a language-independent Revit with the localized content being just a plug-in ?
    Since it is not possible to run both English and German Revit on the same machine, one could develop (and test) localized plug-ins without the need of installing other Revits in VMs.

    Cheers,
    Rudolf

  2. Hi Rudolf,

    Jeremy had forwarded me your comment from his blog, and I was planning to respond today, anyway. ๐Ÿ™‚

    For languages where we provide full-blown localization: no, there is clearly no advantage to having translated tooltips. But there are many languages that do not have formal translations available.

    I'm working closely with our Localization team to determine ways to enable more "field" localization of our products: right now our products require a great deal of effort to localize... they are understandably complex with many internal dependencies. Our various translatable resources - for many of our products - are in separate sets of DLLs (which are grouped into Language Packs, which can even be switched at runtime for some of our products), which makes the process to some degree simpler. But the tesing requirements are still extremely high: maintaining quality in these situations is just a hard problem.

    We are working on the problem: providing tooltip localization won't work for everyone, I agree, but for many it's a start, and is downstream of deeper (and riskier) internal changes.

    To answer your last question, I expect more of our products to adopt Language Pack (and Language Switching) infrastructure over the coming years, which will help a lot. I'll be continuing to investigate additional options related to broadening the ability to translate our software, especially for "tertiary" markets. Tooltips may help for some of these, but it certainly won't be the final answer for all.

    Regards,

    Kean

  3. Hi Kean,
    wow, that's a quick response.

    Yes, I understand what you mean.
    There are many internal dependencies, and: never change a running system, of course.

    I know that many Autodesk products are evolved organically, meaning there is much old stuff and code. Additionally, people expect Autodesk to support backward compatibility for every esoteric programming language, making the job not easier for your dev team.

    I also know that they are on their way and that it will take some *years* to clean up the code for so many different products.

    Thus, I will be patient.

    By the way, talking about AdWindows.dll:
    did you ever pimp your Ribbon bar? ๐Ÿ˜‰

  4. I did - very cool!

    And I have the code ready to share, when I finally get around to it... ๐Ÿ™‚

    Kean

Leave a Reply

Your email address will not be published. Required fields are marked *