Search the Community
Showing results for tags 'اللغات!'.
-
السلام عليكم ورحمة الله وبركاته اخباركم؟ DisplayName ={"Arabic","English","French","German","Korean","Romanian"} theElement = {} function setLanguageText(theElement,...) for n, k in pairs(theElement) do local hFile = fileOpen(DisplayName..".lng", true) local text = tostring(n) _G [ n ] = loadstring (hFile) fileWrite(hFile, text,... ) setElementData (n,"language:gui",...) end end function getLanguageText(text,DisplayName) if getElementData (text,"language:gui") then setLanguageText(text,DisplayName) end return setLanguageText(text,DisplayName) end --Example addEventHandler ("onClientResourceStart",resourceRoot,function() local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 200,100 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 local languagesComboBox = guiCreateComboBox ( left, top, windowWidth,windowHeight, "Languages", false ) for n, k in type("-gui" )do guiComboBoxAddItem ( languageComboBox, guiGetText(getLanguageText(n,"Arabic")) ) guiComboBoxAddItem ( languageComboBox, guiGetText(getLanguageText(n,"English")) ) guiComboBoxAddItem ( languageComboBox, guiGetText(getLanguageText(n,"German")) ) end if guiComboBoxGetSelected(languagesComboBox)then local button = guiCreateButton( 50, 80, 100, 100, "كبار شخصيات", false ) end end) افتح ملف Arabic.lng button = "كبار شخصيات" and English.lng button = "VIP"