DgsSetAttachTranslation

From Multi Theft Auto: Wiki

This function allows following dgs element to attach to translation table when creating.

[[{{{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

Arrow List

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D

Nine Slice

Object Preview

QRCode

mask