DgsAttachToTranslation

From Multi Theft Auto: Wiki

This function attaches a single dgs element to a specfic translation table.

[[{{{image}}}|link=]] Note: This function is different from dgsSetAttachTranslation

Syntax

bool dgsAttachToTranslation ( element dgsElement, string name )

Required Arguments

Returns

Returns a string if succeed, false otherwise.

Example

DGS = exports.dgs
TranslationTable = {
	Test="Text %rep% %rep%"
}
DGS:dgsSetTranslationTable("EN",TranslationTable)
local button = DGS:dgsCreateButton(200,200,200,100,"Login",false)
DGS:dgsAttachToTranslation(button,"EN")  --Attach a single dgs element to the translation table ( which is different from dgsSetAttachTranslation )
DGS:dgsSetText(button,{"Test","Test","DGS"})  --Change text with table to use translation table

setTimer(function()
	TranslationTable2 = {
		Test="L %rep% O %rep% L"
	}
	DGS:dgsSetTranslationTable("EN",TranslationTable2) --Change Translation Table
end,1000,1)

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

QRCode

Remote Image

Rounded Rectangle