DGS Multilingual

From Multi Theft Auto: Wiki
Revision as of 05:49, 11 December 2020 by Thisdp (talk | contribs)
Jump to navigation Jump to search

Description

  • 1. DGS has a built-in multilingul (multi-languae) system.
  • 2. Multilingul allows dynamic language changing and prevents non-essential GUI recreating or text reset by code.
  • 3. DGS Multilingul system will specify the structure of Translation Table (Dictionary).

Usage

Server-Sided G2D script converter (G2DSC)

Command: g2d [-Option] [Arguments]

Options Arguments Comment
-add Resource Name Retain selections and select other resources (-m :Pattern Match)
-c Clear selections
-h G2D Help
-rm Resource Name Remove specific selected resources from list (-m :Pattern Match)
-l List all selected resources
-e Start to convert (execute)
-q Stop converting process

Example
These command is used in MTA Server console.

Basic:

g2d -add resA
g2d -e

Advanced Pattern Mode:

g2d -add .A -m
g2d -e

Output files are stored in dgs/G2DOutput/

Client-Sided G2D Hooker (G2D Hooker)

See detail dgsG2DLoadHooker

Example

loadstring(exports.dgs:dgsImportFunction())() --Import functions before
loadstring(exports.dgs:dgsG2DLoadHooker())()  --Load G2D Hooker
local buttonElement = guiCreateButton(200,200,300,300,"Test",false)  --Though you are using gui functions and events, but they have already hooked by DGS
addEventHandler ( "onClientGUIClick", buttonElement, function()
	outputChatBox("clicked")
end, false )