soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
ITranslatorMgr Struct Reference

Language Translation Interface Manager. More...

#include <STranslator-i.h>

Inheritance diagram for ITranslatorMgr:
IObjRef TObjRefImpl< ITranslatorMgr >

Public Member Functions

long AddRef () PURE
 Increments the reference count.
 
long Release () PURE
 Decrements the reference count.
 
void OnFinalRelease () PURE
 Finalizes the release of the object.
 
BOOL IsValid () SCONST PURE
 Checks if the manager is valid.
 
void SetLanguage (LPCWSTR pszLang) PURE
 Sets the current language for the translation module.
 
void SetLanguageA (LPCSTR pszLang) PURE
 Sets the current language for the translation module.
 
void GetLanguage (wchar_t szOut[TR_MAX_NAME_LEN]) SCONST PURE
 Retrieves the current language for the translation module.
 
void GetLanguageA (IStringA *out) SCONST PURE
 Retrieves the current language for the translation module.
 
BOOL CreateTranslator (ITranslator **ppTranslator) PURE
 Creates a language translation object.
 
BOOL InstallTranslator (ITranslator *ppTranslator) PURE
 Installs a language translation object into the manager.
 
BOOL UninstallTranslator (REFGUID id) PURE
 Uninstalls a language translation object from the manager.
 
int tr (const IStringW *strSrc, const IStringW *strCtx, wchar_t *pszOut, int nLen) SCONST PURE
 Translates a string.
 
- Public Member Functions inherited from IObjRef
long AddRef () PURE
 Increases the reference count.
 
long Release () PURE
 Decreases the reference count.
 
void OnFinalRelease () PURE
 Called when the reference count reaches zero and the object is about to be released.
 

Detailed Description

Language Translation Interface Manager.

This interface defines the methods for managing language translation interfaces.

Definition at line 111 of file STranslator-i.h.

Member Function Documentation

◆ AddRef()

long ITranslatorMgr::AddRef ( )

Increments the reference count.

Returns
The new reference count.

◆ CreateTranslator()

BOOL ITranslatorMgr::CreateTranslator ( ITranslator ** ppTranslator)

Creates a language translation object.

Parameters
ppTranslatorPointer to receive the language translation object.
Returns
TRUE if successful, FALSE otherwise.

◆ GetLanguage()

void ITranslatorMgr::GetLanguage ( wchar_t szOut[TR_MAX_NAME_LEN])

Retrieves the current language for the translation module.

Parameters
szOutBuffer to receive the current language.
Returns
void

◆ GetLanguageA()

void ITranslatorMgr::GetLanguageA ( IStringA * out)

Retrieves the current language for the translation module.

Parameters
outPointer to the IStringA object to receive the current language.
Returns
void

◆ InstallTranslator()

BOOL ITranslatorMgr::InstallTranslator ( ITranslator * ppTranslator)

Installs a language translation object into the manager.

Parameters
ppTranslatorLanguage translation object to install.
Returns
TRUE if successful, FALSE otherwise.

◆ IsValid()

BOOL ITranslatorMgr::IsValid ( )

Checks if the manager is valid.

Returns
TRUE if valid, FALSE otherwise.

◆ OnFinalRelease()

void ITranslatorMgr::OnFinalRelease ( )

Finalizes the release of the object.

Returns
void

◆ Release()

long ITranslatorMgr::Release ( )

Decrements the reference count.

Returns
The new reference count.

◆ SetLanguage()

void ITranslatorMgr::SetLanguage ( LPCWSTR pszLang)

Sets the current language for the translation module.

Parameters
pszLangLanguage to set.
Returns
void
Remarks
Automatically clears modules with different languages.

◆ SetLanguageA()

void ITranslatorMgr::SetLanguageA ( LPCSTR pszLang)

Sets the current language for the translation module.

Parameters
pszLangLanguage to set.
Returns
void
Remarks
Automatically clears modules with different languages.

◆ tr()

int ITranslatorMgr::tr ( const IStringW * strSrc,
const IStringW * strCtx,
wchar_t * pszOut,
int nLen )

Translates a string.

Parameters
strSrcPointer to the IStringW object containing the source string.
strCtxPointer to the IStringW object containing the translation context.
pszOutBuffer to receive the translated string.
nLenLength of the buffer.
Returns
Length of the translated string, 0 if no translation, -1 if buffer size is not enough.

◆ UninstallTranslator()

BOOL ITranslatorMgr::UninstallTranslator ( REFGUID id)

Uninstalls a language translation object from the manager.

Parameters
idGUID of the language translation object to uninstall.
Returns
TRUE if successful, FALSE otherwise.

The documentation for this struct was generated from the following file: