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

Arrow List

Browser

Button

Check Box

Combo Box

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