cadetill's blog | Copyright © Xavier Martínez (cadetill)

# Unit GMLib.Translations

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

## Description

Exceptions and messages translations from GMLib.

The GMLib.Translations contains all translations for the exceptions raised by GMLib.
If you want to add a new translation you must to do:

- Into GMLib.Sets unit: add new language into TGMLang set

- In this unit: add a new Array into const section with translation

- In this unit: modify GetTranslateText function (the second function, the one with Idx as parameter) to add the new language in case statement

## Uses

- GMLib.Sets

## Overview

### Functions and Procedures

`function GetTranslateText(Text: string; const Args: array of const; Lang: TGMLang): string; overload;`
`function GetTranslateText(Idx: Integer; const Args: array of const; Lang: TGMLang): string; overload;`

## Description

### Functions and Procedures

`function GetTranslateText(Text: string; const Args: array of const; Lang: TGMLang): string; overload;`
`GetTranslateText` function retrieves a translated string into the TGMLang language. Is used to generate exception messages. The language of `Text` param must be in English language. For internal use only! ###### Parameters Text String to translate Args Array of arguments to apply to the message Lang Destination language ###### Returns Translated string

`function GetTranslateText(Idx: Integer; const Args: array of const; Lang: TGMLang): string; overload;`
`GetTranslateText` fucntion retrieves a translated string into the TGMLang language. Is used to generate exception messages. For internal use only! ###### Parameters Idx Index of array Args Array of arguments to apply to the message Lang Destination language ###### Returns Translated string

## Author

- Xavier Martinez (cadetill) <cadetill@gmail.com>

## Created

August 2, 2022

## Last Modified

August 2, 2022

Generated by PasDoc 0.15.0.