You are here: How to > Localisation > Advanced Localisation
LMD DialogPack
ContentsIndexHome
PreviousUpNext
Advanced Localisation

LMD DialogPack allows for two other different ways to localising the string contents.

Replace with resource strings 

Use this method if you want to replace the existing resource strings with other resource strings that you have defined. This method would be most useful when you don't want to replace all resource strings used with LMD DialogPack. 

 

To change the localisable resource strings at runtime using the following methods from the JSDialogStrs unit. 

 

  1. GetResourceString
  2. ReplaceResourceString
  3. InitializeResourceStrings

 

Replace with strings 

Use this method if you want to replace the used resource strings with regular strings. This method is most useful when using an alternate way to localising an application (such as using dxGetText which is based on GNU GetText). To first use this method you must call the JSDialogUseResourceStrings method in the JSDialogStrs unit and pass it False. 

 

  1. Call JSDialogUseResourceStrings(False) in your application.
  2. Call GetResourceString to retrieve a list of all available strings that need to be resourced.
  3. Use the overloaded version of ReplaceResourceString to a Resource String value with the new string value.

 

Reset Resources 

You can reset the resource strings used by LMD DialogPack at any time by calling the InitializeResourceStrings method from JSDialogStrs. Alternatively, when you call the JSDialogUseResourceStrings method, the resources used get reset back to their defaults. 

 

An example of the "Replace with strings" method is contained in the String Localisation demo in the TJSDialog category of Demo Browser

An example of the "Replace with resource strings" method is contained in the Main Demo Application on the Localisation tab.

Copyright © 2013 by LMD Innovative. All rights reserved.
Copyright © 2013 by LMD Innovative. All rights reserved.
What do you think about this topic? Send feedback!