roblox-localization
Use when implementing Roblox multi-language support, translation tables, auto-translation, locale-specific content, or region detection.
Install
npx skills add https://github.com/tabooharmony/roblox-brain --skill roblox-localizationSKILL.md
Roblox Localization
When to Load
Load when implementing multi-language support, translation systems, locale-specific content, or region detection. Covers LocalizationService, LocalizationTable, auto-translation, and country/region detection.
Quick Reference
Locale Detection
player.LocaleId: locale the player set for their Roblox account (e.g.en-us,pt-br,ja-jp)LocalizationService.RobloxLocaleId: locale for core/internal featuresLocalizationService.SystemLocaleId: player's OS localeLocalizationService:GetCountryRegionForPlayerAsync(player): country code from IP geolocation (e.g.US,BR,JP)
Translation Tables
LocalizationTable: stores translation entries (key → translations per locale)- Parent
LocalizationTableunderLocalizationServicefor auto-translation - Set
GuiBase2d.RootLocalizationTableon GUI objects for per-element tables - Studio can auto-extract strings into a table via the Localization Tools plugin
Auto-Translation
- Auto-translation requires
AutoLocalize = trueon the GUI and its ancestors, plus a matching table entry - Set
TextLabel.Textnormally; the engine replaces it with the translated string for the player's locale - Missing translations fall back to the source text
Manual Translation
local translator = LocalizationService:GetTranslatorForPlayerAsync(player)
local translated = translator:Translate(game, "Welcome!")
local formatted = translator:FormatByKey("coins_count", {count})
Country/Region Detection
local country = LocalizationService:GetCountryRegionForPlayerAsync(player)
if country == "US" then -- USD pricing
-- US offer
elseif country == "GB" then
-- UK offer
end
Key Rules
GetCountryRegionForPlayerAsyncis async; wrap in pcall, may failGetTranslatorForPlayerAsyncis async; cache the translator- Set
RootLocalizationTableto choose a table; keepAutoLocalizetrue through the ancestor chain - Translation entries:
SourceText,SourceLocaleId, thenen-us,pt-br, etc. columns - Export/import tables as CSV from Studio for bulk editing
- Test with different locales using Studio's locale simulator
Pitfalls
- Not all locales supported; check
player.LocaleId - Auto-translation does NOT work on non-GUI text; use manual
Translator:Translate GetCountryRegionForPlayerAsyncuses IP geolocation, so VPNs give wrong results- Missing entries fall back to source text silently
Need more detail? Load references/full.md.
Related skills
godot-gdscript-patternswshobson16KMaster Godot 4 GDScript patterns including signals, scenes, state machines, and optimization. Use when building Godot games, implementing game systems, or learning GDScript best practices.game-enginegithub13KExpert skill for building web-based game engines and games using HTML5, Canvas, WebGL, and JavaScript. Use when asked to create games, build game engines, implement game physics, handle collision detection, set up game loops, manage sprites, add game controls, or work with 2D/3D rendering. Covers techniques for platformers, breakout-style games, maze games, tilemaps, audio, multiplayer via WebRTC, and publishing games.unity-ecs-patternswshobson11KMaster Unity ECS (Entity Component System) with DOTS, Jobs, and Burst for high-performance game development. Use when building data-oriented games, optimizing performance, or working with large entity counts.msw-defaultplayermsw-git7.9KMSW DefaultPlayer (character) management. Use the msw-general ModelBuilder to inspect/patch DefaultPlayer.model and Player.model, add/remove components, configure movement speed / jump force / HP / camera, and per-map-mode movement components. Use for DefaultPlayer model, player components, movement speed, jump force, HP, camera, physics. Keywords: player, DefaultPlayer, speed, jump, HP, camera, gravity, revive, respawn, character.