Skip to content
This repository was archived by the owner on Jul 13, 2025. It is now read-only.

Commit 3fa2d60

Browse files
committed
supportedLanguages is unnecessary now
1 parent 574a8e4 commit 3fa2d60

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/tr.lua

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,10 @@ local Config = require(script.Parent.Config)
33

44
local Localization = script.Parent.Localization
55

6-
local supportedLanguages = {
7-
["en_US"] = "en-us",
8-
["es_ES"] = "es-es"
9-
}
10-
11-
local defaultLocale = "en-us"
12-
local locale = supportedLanguages[Studio.StudioLocaleId]
13-
14-
local translator = Localization:GetTranslator(locale or defaultLocale)
15-
local fallback = locale ~= defaultLocale and Localization:GetTranslator(defaultLocale) -- JIC the string hasn't been translated
6+
local defaultLocale = "en_US"
7+
local translator = Localization:GetTranslator(Studio.StudioLocaleId)
8+
-- Just in case the string hasn't been translated
9+
local fallback = Studio.StudioLocaleId ~= defaultLocale and Localization:GetTranslator(defaultLocale)
1610

1711
local function tr(key: string, args: any): string
1812
if Config.testLocalization then

0 commit comments

Comments
 (0)