[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'gettext' (#fcl)

# TMOFile.Translate

Translate a string

## Declaration

Source position: line 0

`public function TMOFile.Translate(`
`AOrig: PChar;`
`ALen: Integer;`
`AHash: LongWord`
`):String; function TMOFile.Translate(`
`AOrig: String;`
`AHash: LongWord`
`):String; function TMOFile.Translate(`
`AOrig: String`
`):String;`

## Arguments

`AOrig` |  | String to translate.
`ALen` |  | Length of the original string.
`AHash` |  | Hash value of the original string.

## Function result

Translated string.

## Arguments

`AOrig` |  | String to translate.
`AHash` |  | Hash value of the original string.

## Function result

Translated string.

## Arguments

`AOrig` |  | String to translate.

## Function result

Translated string.

## Description

Translate translates the string AOrig. The string should be in the .mo file as-is. The string can be given as a plain string, as a PChar (with length ALen). If the hash value (AHash) of the string is not given, it is calculated.

If the string is in the .mo file, the translated string is returned. If the string is not in the file, an empty string is returned.

## Errors

None.

The latest version of this document can be found at lazarus-ccr.sourceforge.net .