ProoCountry (country flags module)

[WARNING]:
This library is now deprecated, use the following library instead:
CountryService (Country data Module) - Resources / Community Resources - Developer Forum | Roblox

Hi guys, I came here to show this library that took me a way too long to make. Essentially what it does is grab on the code of a country and return a decal of its flag/name. All flags have been manually uploaded by me and have a similar aspect ratio (tried to keep them as close to each other as possible).

This can be used to develop country leaderboards, displayers and or basically anything that is country related.

Here’s an example on how to use it:

--[[
    This is a local script inside of the player scripts
]]

--Services||
local LocalizationService 	= game:GetService("LocalizationService")
local ReplicatedStorage 	= game:GetService("ReplicatedStorage")
local Players 				= game:GetService("Players")
----------||

--Dependencies||
local countries = require(ReplicatedStorage:WaitForChild("ProoCountry"))
--------------||

--Variables||
local player = game.Players.LocalPlayer
-----------||

--Methods||
local result, code = pcall(function()
	--Get the country code
	return LocalizationService:GetCountryRegionForPlayerAsync(player)
end)

if result and code ~= nil then
	
	--Get the information about this count (both name and flag)
	local countryData = countries.getCountry(code)
	print(countryData)
else
	warn("Couldn't proccess players country")
end
---------||

Example:

Links:

example place (copy unlocked): Flag API - Roblox
code (github): GitHub - prooheckcp/ProoCountry: A small library that returns both the country name/flag from the code

29 Likes

thanks man this saved me a lot of time

1 Like

This is cool I like it. This saves me a whole ton of time and it’s cool and well made!

3 Likes

THANK YOU SO MUCH! I really needed this.

For some reason I cannot edit the game.

Works nice, but why don’t you just use flag emojis? (I’m pretty sure they can be used in studio since I saw a bunch of people do it but I’m not sure) Easier than having to upload a bunch of flag images and looks better overall

I wanted this to use with ImageLabels and Decals not specifically to put on top of players. This is just something for a personal project that I decided to open source

1 Like

Saved me a lot of time thanks. I tried to do this recently but uploading all the flags and getting the ids take so long because they have to be accepted

This Library is now and finally deprecated! Please use this newer one that adds support to Emojis and requires less steps to use! CountryService (Country data Module) - Resources / Community Resources - DevForum | Roblox