Adding new target language

  • I would like to add new target languages to ForeignDesk.  How must I accomplish this, in the code or is there another way. Thanks

    • Bill Keese
      Bill Keese

      If your language is similar to an existing language, you can just "lie" to ForeignDesk when creating the project.  For example, although German and English are separate languages, since Foreigndesk treats them the same way, since they have the same codepage, same punctuation structure.  Thus, if you picked "English" instead of "German" everything would work.  Do you want to add dutch?

      On the other hand, if your language is not similar to an implemented language, you probably need to modify the code (language.cpp, constants.h, and some other files.)  Search for "japanese" and add your language anywhere that language occurs.  Of course, this requires MSDEV V6, and knowledge of how to use it.

    • Brian Ewins
      Brian Ewins

      Is it possible to change the code to be driven by some external files? Just reading language.cpp it seems to be a bunch of hardcoded tables that wouldn't be too hard to get from elsewhere. Same goes for ddlTokenize::GetCharSet,  and nearly all of sTextUtils. If these tables were loaded from external files it would lower the barrier to adding new language support immensely.

      I'm interested in this as I have a need for a tool which can help with translation to Welsh and Scots Gaelic; unfortunately my dev expertise isn't in C++ any more - 7 or 8 years since I used that on a day to day basis and I don't have the tools any more.

      • Bill Keese
        Bill Keese


        Of course, you are right.  It's a bit complicated because Foreigndesk uses both Windows and ICU libraries, and also because someone started changing the code from using langcode to langid (or something like that) but never finished.   However, I think it could certainly be done.  (I'm not volunteering right now but if I have some time I will consider it.)

        Do Welsh and Scots Gaelic have different code pages and/or grammar rules than English/French/German/etc.?