DgsSetAttachTranslation

From Multi Theft Auto: Wiki

This function allows following dgs element to attach to translation table when creating in the same resource.

This is not client-global setting, only resource-global.

[[{{{image}}}|link=]] Note: This function is different from dgsAttachToTranslation. See detail information in example

Syntax

bool dgsSetTranslationName ( string name )

Required Arguments

  • name: The translation name

Returns

Returns a string if succeed, false otherwise

Example

DGS = exports.dgs
TranslationTable = {
	login = "Login",
	register = "Register",
}
DGS:dgsSetTranslationTable("EN",TranslationTable)
DGS:dgsSetAttachTranslation("EN")  --DGS Elements created after this function will be automatically attached to translation table "EN"
local login = DGS:dgsCreateButton(200,200,200,100,{"login"},false)  --It is unnecessary to use dgsAttachToTranslation again
local register= DGS:dgsCreateButton(500,200,200,100,{"register "},false)  
DGS:dgsSetAttachTranslation()  --Reset

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Selector

Switch Button

Tab Panel

Window

Plugin

Blur Box

Color Picker

Canvas

Effect 3D

Media Browser

Mask

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Rounded Rectangle