I can get game name using this. But is it already translated?
https://devforum.roblox.com/t/how-to-get-a-game-name-from-a-script/1259719/3?u=etnowis
How may I get the translated game name according to the player’s locale?
I can get game name using this. But is it already translated?
https://devforum.roblox.com/t/how-to-get-a-game-name-from-a-script/1259719/3?u=etnowis
How may I get the translated game name according to the player’s locale?
You would need a localization table with predified translation for the following dictionary of keys.
LocalizationTable Library | LocalizationService Library
The Following code would look something like this when done correctly:
local marketPlaceService = game:GetService("MarketplaceService")
local localization = game:GetService("LocalizationService")
local players = game:GetService("Players")
local player = players.LocalPlayer
local result, code = pcall(localization.GetCountryRegionForPlayerAsync, localization, player)
if not result then warn("GetCountryRegionForPlayerAsync failed: ".. code) end
print(code)
local placeID = 73290985443559
local info = marketPlaceService:GetProductInfo(placeID)
local placeName = info.Name --returns فورت نايت العرب
print("original: "..placeName)
--local translator = localization:GetTranslatorForLocaleAsync("es")
local translator = localization:GetTranslatorForPlayerAsync(player)
local translated_text = translator:Translate(game, placeName)
print("translated: "..translated_text) -- returns Arabe Fortnite
Other way to translate would be using external translation APIs through HttpService or etc.