Language translation functions
This page applies to Harlequin v13.1r0 and later; and to Harlequin MultiRIP but not Harlequin Core
The PFI provides the following message translation functions:
Translate a message
This function translates the input message from English to local language if possible.
Translation succeeds if ptbzMessage
differs from a known translatable message only by extra leading and/or trailing \n
characters. The leading and/or trailing \n
characters are added to the translation, so are preserved.
The function has the following return values and behavior:
- If translation was performed, the function returns 1 and appends the translation to
pOutput
- If no translation could be performed, the function returns 0 and appends the input message
(ptbzMessage)
topOutput
unchanged. - If no translation could be performed but
ptbzMessage
contained translation markers, the function returns 2, stripsptbzMessage
of translation markers and appends the result topOutput
. The use and meaning of translation markers within strings is private to the RIP.
int32 PlgFwTranslMessage(
PlgFwTextString ptbzMessage, PlgFwStrRecord *pOutput)
Translate a message one line at a time
This function has the same functionality as PlgFwTranslMessage
, but if the message cannot be translated when considered as a single entity, an attempt is made to translate each line individually.
The return values are the same as for PlgFwTranslMessage
.
int32 PlgFwTranslMessageLineByLine(
PlgFwTextString ptbzMessage, PlgFwStrRecord *pOutput);
Retrieve font information from the header of the translation file
This function interrogates the header of the translation file for font information. The function retrieves the font information from the last file loaded by the RIP which had non‐default font information.
If no files have provided non‐default font information, it sets *pptbzFontName
to NULL
and *pFontSize
to 0
.
See the, “Harlequin MultiRIP Localization Kit Manual ” for more information on font details in the messages file header.
void PlgFwTranslGetFontInfo(
PlgFwTextString *pptbzFontName, int32 *pFontSize)