All country codes in the world matched up with their respective continent, for region display.
What is CountryCodes?
When using LocalizationService:GetCountryRegionForPlayerAsync() it returns a 2 letter code this is a table to get the continent the player is in for example to use if you have a server list so players can view the region of a server to optimize their ping while playing ![]()
Table format: Code = “Region”
Example:
AF = “Asia” (afghanistan)
BR = “South America” (brazil)
Example Usage:
local Player = game.Players.LocalPlayer
local LocalizationService = game:GetService("LocalizationService")
local CountryCodes = require(game:GetService("ReplicatedStorage".CountryCodes)
local CountryCode = LocalizationService:GetCountryRegionForPlayerAsync(Player)
print(CountryCodes[CountryCode])
The code above will print the continent the player is in, so for example Asia, North America, Europe etc. Personally I use this for the serverlist in my game but you can use this however you want.