Skip to main content
Participating Frequently
February 28, 2017
Answered

Default translation

  • February 28, 2017
  • 1 reply
  • 475 views

I am developing an InDesign plugin in C++ and I run into the following issue:

I have a combobox, in my .fr file, like so:

  1.                                 EVEDropDownListWidget  
  2.                                 ( 
  3.                                     someWidgetID,  
  4.                                     kSysDropDownPMRsrcId,  
  5.                                     kBindNone,  
  6.                                     Frame(0, 0, 100, 20), 
  7.                                     kTrue,  
  8.                                     kTrue,  
  9.                                     {{ 
  10.                                         someStringKey 
  11.                                     }}, 
  12.                                     kEVEAlignLeft | kEVERegularSpaceAfter,  
  13.                                 ), 

I load some English words into the combobox, for example: "Default".

But something strange happens: When I use the Dutch version or German version of InDesign, it will automatically translate these values... As if ID has some internal dictionary.

Default -> Becomes: Standaard (For Dutch)

Default -> Becomes: Standard (For German)

But I don't want that... I want it to remain "Default" no matter which version/language of InDesign is installed.

What can I do to disable it?

This topic has been closed for replies.
Correct answer Manan Joshi

This does not happen automatically, the plugin must have translations for these strings for the locale you are specifying. In order to suppress these translations use the following resources in your fr file

Currently the string table resource must have been specified using kSDKDefStringsResourceID, and its definition would have been defined in different locale specific fr files like *_jaJP.fr file for Japenese.

For all the strings you don't want to be translated, place them in the String table defined below. Look the programming guide for more details.

resource LocaleIndex (kSDKDefStringsNoTransResourceID)

{

  kStringTableRsrcType,

  {

  kWildFS, k_Wild, kSDKDefStringsNoTransResourceID + index_enUS

  }

};

resource StringTable (kSDKDefStringsNoTransResourceID + index_enUS)

{

  k_enUS, // Locale Id

  kEuropeanMacToWinEncodingConverter, // Character encoding converter

  {

  // No-Translate strings go here:

  }

};

-Manan

1 reply

Manan JoshiCommunity ExpertCorrect answer
Community Expert
March 1, 2017

This does not happen automatically, the plugin must have translations for these strings for the locale you are specifying. In order to suppress these translations use the following resources in your fr file

Currently the string table resource must have been specified using kSDKDefStringsResourceID, and its definition would have been defined in different locale specific fr files like *_jaJP.fr file for Japenese.

For all the strings you don't want to be translated, place them in the String table defined below. Look the programming guide for more details.

resource LocaleIndex (kSDKDefStringsNoTransResourceID)

{

  kStringTableRsrcType,

  {

  kWildFS, k_Wild, kSDKDefStringsNoTransResourceID + index_enUS

  }

};

resource StringTable (kSDKDefStringsNoTransResourceID + index_enUS)

{

  k_enUS, // Locale Id

  kEuropeanMacToWinEncodingConverter, // Character encoding converter

  {

  // No-Translate strings go here:

  }

};

-Manan

-Manan