DgsSetAttachTranslation

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

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 dgsSetAttachTranslation( 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

Custom Cursor Functions

Multi Language Supports

Animation

3D Interface

3D Line

3D Image

3D Text

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Detect Area

Drag'N Drop

Grid List

Image

Memo

Label

Line

Progress Bar

Radio Button

Scale Pane

Scroll Bar

Scroll Pane

Selector

Style

Switch Button

Tab Panel

Window

Plugin

Blur Box

Color Picker

Canvas

Circle

Effect 3D

Media Browser

Mask

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Rounded Rectangle