TMiscFunctions Class

Provides some miscellaneous functions.

GetSystemLanguage

Returns the current system language.

Format:

static TLanguage GetSystemLanguage();
					
class function GetSystemLanguage: TLanguage;
					

Return value: Item of the type TLanguage.

Parameters: None.

ParseProgramVersion

Parses the string containing the version, for example: 1.5.10.0 beta 7.

Format:

static bool ParseProgramVersion (
  const UnicodeString &VersionAsString,
  TProgramVersion &Version);
				
class function ParseProgramVersion(
  const VersionAsString: WideString; 
  var Version: TProgramVersion): Boolean;
				

Return value: True if the version was successfully parsed.

Parameters:

ProgramVersionToString

Represents version information as a string.

Format:

static UnicodeString ProgramVersionToString (
  const TProgramVersion &Version);
				
class function ProgramVersionToString(
  const Version: TProgramVersion): WideString;
				

Return value: Version number as string, for example: 1.5.10.14 beta 7.

Parameter (TProgramVersion): The input structure with the version number.

DownloadTranslation

Downloads the specified translation from the site to the translations folder.

Format:

static void DownloadTranslation(
  const TOnSiteTranslation &OnSiteTranslation,
  const UnicodeString &TranslationsFolder,
  TVoidBoolFunction ResultFunc,
  const TProxyServerSettings &ProxySettings,
  ptrdiff_t CallbackParam);
				
class procedure DownloadTranslation(
  const OnSiteTranslation: TOnSiteTranslation;
  const TranslationsFolder: WideString;
  ResultFunc: TVoidBoolFunction;
  const ProxySettings: TProxyServerSettings); overload;
				

Return value: None.

Parameters:

StringToLanguage

Converts the string to the language. The string may contain either only the language name, for example: "French", "Russian", or the language name and locale name pair in the following form: "Portuguese(pt-BR)".

Format:

static TLanguage StringToLanguage (const UnicodeString &Str);
				
class function StringToLanguage(const Str: WideString) : TLanguage;
				

RegisterTheDemandedTranslationShow

Registers the show of the demanded translation offer. This will increase the on-site counter, so that you will be able to view how often the offer has been shown to translate the program into the language of the demanded translation.

Format:

static void RegisterTheDemandedTranslationShow (
  const UnicodeString &RegisterShowUri,
  const TProxyServerSettings &ProxySettings);
				
class procedure RegisterTheDemandedTranslationShow(
  const RegisterShowUri: WideString;
  const ProxySettings: TProxyServerSettings);
				

Return value: None.

Parameters:

ResetStoredStates

Resets the stored state of the settings for the testing purposes. For example, if the demanded translation offer has been shown on the current system, it will not be shown again until you call this function.

Format:

static void ResetStoredStates (const UnicodeString &TranslationsFolder);
				
class procedure ResetStoredStates(const TranslationsFolder: WideString);
				

Return value: None.

Parameter: Translation files folder on the local drive.