TTranslationsSite Class

Exchanges the information related to working with the translations with the server site.

Constructor

Format:

TTranslationsSite (const UnicodeString &AccountName,
  const UnicodeString &ProgramName,
  const TProxyServerSettings &ProxySettings,
  const UnicodeString &HostUri);
					
constructor Create(const AccountName: WideString;
  const ProgramName: WideString;
  const ProxySettings: TProxyServerSettings;
  const HostUri: WideString); overload;
					

Parameters:

GetAccountUri

Returns the URI of your LangsHelper account like langshelper.com/DemoAccount.

Format:

UnicodeString GetAccountUri ();
				
function GetAccountUri: WideString;
				

GetAllBestOnSiteTranslations

Returns the list of all translations on the site compatible with the specified version of the program. The more recent versions of the translations are returned. For each available language, the most suitable translation is returned.

Format:

void GetAllBestOnSiteTranslations (
  const TProgramVersion &ForVersion,
  TOnSiteTranslationsOptionalGetFunc ResultFunc,
  TStopFunc StopFunc,
  ptrdiff_t CallbackParam);
				
procedure GetAllBestOnSiteTranslations(
  const ForVersion: TProgramVersion;
  ResultFunc: TOnSiteTranslationsOptionalGetFunc;
  StopFunc: TStopFunc = nil);
				

Return value: None.

Parameters:

GetBestOnSiteTranslation

Returns, if any, the best translation to the specified language, which is compatible with the program of the specified version.

Format:

void GetBestOnSiteTranslation (const TLanguage &Language,
  const TProgramVersion &ForVersion,
  TOnSiteTranslationOptionalGetFunc ResultFunc,
  TStopFunc StopFunc,
  ptrdiff_t CallbackParam);
				
procedure GetBestOnSiteTranslation(const Language: TLanguage;
  const ForVersion: TProgramVersion;
  ResultFunc: TOnSiteTranslationOptionalGetFunc;
  StopFunc: TStopFunc = nil);
				

Return value: None.

Parameters:

RateTranslation

Sends the positive or negative rating about the translation.

Format:

bool RateTranslation (const UnicodeString &TranslationFileName,
  bool IsPositive,
  TVoidBoolFunction RatingSentFunc,
  ptrdiff_t CallbackParam);
				
function RateTranslation(const TranslationFileName: WideString;
  const IsPositive: Boolean;
  RatingSentFunc: TVoidBoolFunction
  ): Boolean;
				

Return value: If no function is passed through the RatingSentFunc parameter, the function will return after the rate is passed to the site and return the success of this operation. Otherwise, the function will work asynchronously and pass its result to the function from the RatingSentFunc parameter. The return value will be always true in this case.

Parameters:

GetDemandedTranslations

Returns the information about the demanded translations. The demanded translation is the name of the language for which you would like to get the translations as soon as possible. If the system language is the same as the demanded language, we could show a message to the user encouraging them to translate the program.

Format:

void GetDemandedTranslations (TDemandedTranslationsGetFunc ResultFunc,
  TStopFunc StopFunc,
  ptrdiff_t CallbackParam);
				
procedure GetDemandedTranslations(ResultFunc: TDemandedTranslationsGetFunc;
  StopFunc: TStopFunc);
				

Return value: None.

Parameters: