-- [ ======== Define your texts in ENGLISH in the table below ======== ] -- local Translations = { Apple = "Apple", Hi = "Hey Guys!", Test = "This is a test XD", Credits = "Created by Termux_404, Open source :D" } -- [ ======== Source (no changes needed) ======== ] -- local cloneref = cloneref or function(o) return o end local HttpService = cloneref(game:GetService("HttpService")) local Players = cloneref(game:GetService("Players")) pcall(function() if Players.LocalPlayer.LocaleId:lower() ~= "en-us" then local lang = Players.LocalPlayer.LocaleId:sub(1, 2) local completed, keys, texts, total = 0, {}, {}, 0 for k, v in pairs(Translations) do total += 1 keys[total], texts[total] = k, v end local function translateIndex(i) local text = texts[i] if not text then return end task.spawn(function() local ok, res = pcall(function() return game:HttpGet( "https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=" .. lang .. "&dt=t&q=" .. HttpService:UrlEncode(text) ) end) if ok and res then local data = HttpService:JSONDecode(res) local translated = "" if data and data[1] then for _, part in ipairs(data[1]) do translated ..= part[1] or "" end end if translated ~= "" then Translations[keys[i]] = translated:match("^%s*(.-)%s*$") end end completed += 1 end) end for i = 1, total do translateIndex(i) end repeat task.wait() until completed >= total end end) -- [ ======== Use of translated texts ======== ] -- print(Translations.Apple) print(Translations.Hi) print(Translations.Test) print(Translations.Credits)