This commit is contained in:
lx
2026-07-06 14:01:11 -04:00
commit c4f97d729d
16468 changed files with 935321 additions and 0 deletions
@@ -0,0 +1,21 @@
--[[
Helper for supplying the current Roblox Locale to the Roact
tree via context using the LocalizationContextProvider
]]
local CorePackages = game:GetService("CorePackages")
local LocalizationService = game:GetService("LocalizationService")
local Roact = require(CorePackages.Roact)
local LocalizationContextProvider = require(script.Parent.LocalizationContextProvider)
local getLocalizationContext = require(script.Parent.Parent.Parent.Localization.getLocalizationContext)
local function provideRobloxLocale(renderFunc)
return Roact.createElement(LocalizationContextProvider, {
localizationContext = getLocalizationContext(LocalizationService.RobloxLocaleId),
render = renderFunc
})
end
return provideRobloxLocale