DgsAttachToTranslation: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client function}} __NOTOC__ This function attaches dgs element to a specfic translation table. ==Syntax== <syntaxhighlight lang="lua"> bool dgsAttachToTranslation ( elemen...")
 
Line 25: Line 25:
DGS:dgsAttachToTranslation(button,"EN")
DGS:dgsAttachToTranslation(button,"EN")
DGS:dgsSetText(button,{"Test","Test","DGS"})
DGS:dgsSetText(button,{"Test","Test","DGS"})
setTimer(function()
TranslationTable2 = {
Test="L %rep% O %rep% L"
}
DGS:dgsSetTranslationTable("EN",TranslationTable2)
end,1000,1)
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{DGSFUNCTIONS}}
{{DGSFUNCTIONS}}

Revision as of 04:54, 7 September 2018

This function attaches dgs element to a specfic translation table.

Syntax

bool dgsAttachToTranslation ( element dgsElement, string name )

Required Arguments

  • dgsElement: The dgs element you want to attach.
  • name: The name of tranlation table you want to attach to.

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")
DGS:dgsSetText(button,{"Test","Test","DGS"})

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

See Also

Custom Cursor Functions

Multi Language Supports

Animation

3D Element

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

Menu

Label

Layout

Line

Progress Bar

Radio Button

Scale Pane

Scroll Bar

Scroll Pane

Selector

Style

Switch Button

Tab Panel

Window

Basic Shape Plugins

Circle

Quadrilateral

Rounded Rectangle

Other Plugins

Blur Box

Canvas

Chart

Color Picker

Effect 3D

Gradient

Mask

Media Browser

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Screen Source

SVG

Tooltips