15 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

LocalizationService

Inherits from: Instance → Object

LocalizationService is the service responsible for handling automated translation.

It is used as a storage for LocalizationTable objects used by automatic text replacement.

LocalizationService will only use its child LocalizationTables for automatic text replacement unless GuiBase2d.RootLocalizationTable is specified on a GUI object or its ancestors.

Inherits from: Instance

Memory category: Instances

Tags: NotCreatable, Service, NotReplicated

Properties

NameType / ReturnsDescription
LocalizationService.RobloxLocaleIdstringThe locale ID used for localizing core and internal features.
LocalizationService.SystemLocaleIdstringThe locale ID that the local player has set for their operating system.

Inherited from Instance

NameType / ReturnsDescription
Instance.ArchivablebooleanDetermines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published.
Instance.archivableboolean
Instance.CapabilitiesSecurityCapabilitiesThe set of capabilities allowed to be used for scripts inside this container.
Instance.IsInSandboxbooleanIndicates whether the instance is inside a sandboxed container.
Instance.NamestringA non-unique identifier of the Instance.
Instance.ParentInstanceDetermines the hierarchical parent of the Instance.
Instance.PredictionModePredictionModeReflects the client-side prediction mode applied to the instance under server-authoritative physics.
Instance.RobloxLockedbooleanA deprecated property that used to protect CoreGui objects.
Instance.SandboxedbooleanWhen enabled, the instance can only access abilities in its Capabilities list.
Instance.UniqueIdUniqueIdA unique identifier for the instance.

Inherited from Object

NameType / ReturnsDescription
Object.ClassNamestringA read-only string representing the class this Object belongs to.
Object.classNamestring

LocalizationService.RobloxLocaleId

This property shows the locale ID used for the localization of core and internal features such as CoreGui. Returns a string with the two letter code (for example, en-us) for the locale.

FieldValue
typestring
tags["ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryLocalization
serialization{"can_load":false,"can_save":false}
capabilities["Basic"]

LocalizationService.SystemLocaleId

This property shows the locale ID that the local player has set for their operating system.

This will return a string with the two letter code (for example, "en-us") for the locale.

See also Player.LocaleId, the locale ID that a user has set for their Roblox account which is used for localizing in-experience content. This will be a different value when that player's account locale isn't supported for localizing Roblox UI content.

FieldValue
typestring
tags["ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryLocalization
serialization{"can_load":false,"can_save":false}
capabilities["Basic"]

Methods

NameType / ReturnsDescription
LocalizationService:GetCorescriptLocalizationsInstancesReturns a list of LocalizationTable objects used for localizing core scripts.
LocalizationService:GetCountryRegionForPlayerAsyncstringReturns country/region code string according to player's client IP geolocation.
LocalizationService:GetTableEntriesArrayGets all entries used for automated localization.
LocalizationService:GetTranslatorForLocaleAsyncInstanceYields until the cloud LocalizationTable for the argument locale has been loaded - if available. Returns a Translator instance to be used for translations for the provided locale.
LocalizationService:GetTranslatorForPlayerInstanceReturns a Translator to be used for translations using the locale data loaded.
LocalizationService:GetTranslatorForPlayerAsyncInstanceYields until the cloud LocalizationTable for the player's locale has been loaded - if available. Returns a Translator instance to be used for translations for the provided locale.

Inherited from Instance

NameType / ReturnsDescription
Instance:AddTag()Applies a tag to the instance.
Instance:childrenInstancesReturns an array of the object's children.
Instance:ClearAllChildren()This method destroys all of an instance's children.
Instance:CloneInstanceCreate a copy of an instance and all its descendants, ignoring instances that are not Archivable.
Instance:cloneInstance
Instance:Destroy()Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children.
Instance:destroy()
Instance:FindFirstAncestorInstance?Returns the first ancestor of the Instance whose Instance.Name is equal to the given name.
Instance:FindFirstAncestorOfClassInstance?Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className.
Instance:FindFirstAncestorWhichIsAInstance?Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstChildInstance?Returns the first child of the Instance found with the given name.
Instance:findFirstChildInstance
Instance:FindFirstChildOfClassInstance?Returns the first child of the Instance whose ClassName is equal to the given class name.
Instance:FindFirstChildWhichIsAInstance?Returns the first child of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstDescendantInstance?Returns the first descendant found with the given Instance.Name.
Instance:GetActorActor?Returns the Actor associated with the Instance, if any.
Instance:GetAttributeVariantReturns the value which has been assigned to the given attribute name.
Instance:GetAttributeChangedSignalRBXScriptSignalReturns an event that fires when the given attribute changes.
Instance:GetAttributesDictionaryReturns a dictionary of the instance's attributes.
Instance:GetChildrenInstancesReturns an array containing all of the instance's children.
Instance:getChildrenInstances
Instance:GetDebugIdstringReturns a coded string of the debug ID used internally by Roblox.
Instance:GetDescendantsInstancesReturns an array containing all of the descendants of the instance.
Instance:GetFullNamestringReturns a string describing the instance's ancestry.
Instance:GetStyledVariantReturns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified.
Instance:GetStyledPropertyChangedSignalRBXScriptSignalReturns an event that fires when the given style property changes on the instance.
Instance:GetTagsArrayGets an array of all tags applied to the instance.
Instance:HasTagbooleanCheck whether the instance has a given tag.
Instance:IsAncestorOfbooleanReturns true if an Instance is an ancestor of the given descendant.
Instance:IsDescendantOfbooleanReturns true if an Instance is a descendant of the given ancestor.
Instance:isDescendantOfboolean
Instance:IsPropertyModifiedbooleanReturns true if the value stored in the specified property is not equal to the code-instantiated default.
Instance:QueryDescendantsInstancesReturns an array containing all descendants of the instance that match the selector string.
Instance:Remove()Sets the object's Parent to nil, and does the same for all its descendants.
Instance:remove()
Instance:RemoveTag()Removes a tag from the instance.
Instance:ResetPropertyToDefault()Resets a property to its default value.
Instance:SetAttribute()Sets the attribute with the given name to the given value.
Instance:WaitForChildInstanceReturns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does.

Inherited from Object

NameType / ReturnsDescription
Object:GetPropertyChangedSignalRBXScriptSignalGet an event that fires when a given property of the object changes.
Object:IsAbooleanReturns true if an object's class matches or inherits from a given class.
Object:isAboolean

LocalizationService:GetCorescriptLocalizations

Returns a list of LocalizationTable objects used for localizing core scripts.

Returns

TypeDescription
InstancesA list of LocalizationTable objects used for localizing CoreScripts.
FieldValue
securityNone
thread safetyUnsafe
capabilities["Basic"]

LocalizationService:GetCountryRegionForPlayerAsync

Returns a country/region code string according to player's client IP geolocation. The supported country/region codes are as follows:

Code Country/Region
XXUnknown Country
USUnited States
GBUnited Kingdom
CACanada
AFAfghanistan
AXAland Islands
ALAlbania
DZAlgeria
ASAmerican Samoa
ADAndorra
AOAngola
AIAnguilla
AQAntarctica
AGAntigua and Barbuda
ARArgentina
AMArmenia
AWAruba
AUAustralia
ATAustria
AZAzerbaijan
BSBahamas
BHBahrain
BDBangladesh
BBBarbados
BYBelarus
BEBelgium
BZBelize
BJBenin
BMBermuda
BTBhutan
BOBolivia
BQBonaire, Saint Eustatius and Saba
BABosnia and Herzegovina
BWBotswana
BVBouvet Island
BRBrazil
IOBritish Indian Ocean Territory
BNBrunei Darussalam
BGBulgaria
BFBurkina Faso
BIBurundi
KHCambodia
CMCameroon
CVCape Verde
KYCayman Islands
CFCentral African Republic
TDChad
CLChile
CNChina
CXChristmas Island
CCCocos Islands
COColombia
KMComoros
CGCongo
CDCongo (DRC)
CKCook Islands
CRCosta Rica
CIIvory Coast
HRCroatia
CWCuraçao
CYCyprus
CZCzech Republic
DKDenmark
DJDjibouti
DMDominica
DODominican Republic
ECEcuador
EGEgypt
SVEl Salvador
GQEquatorial Guinea
EREritrea
EEEstonia
ETEthiopia
FKFalkland Islands (Malvinas)
FOFaroe Islands
FJFiji
FIFinland
FRFrance
GFFrench Guiana
PFFrench Polynesia
TFFrench Southern Territories
GAGabon
GMGambia
GEGeorgia
DEGermany
Code Country/Region
GHGhana
GIGibraltar
GRGreece
GLGreenland
GDGrenada
GPGuadeloupe
GUGuam
GTGuatemala
GGGuernsey
GNGuinea
GWGuinea-Bissau
GYGuyana
HTHaiti
HMHeard Island and the McDonald Islands
VAHoly See
HNHonduras
HKHong Kong
HUHungary
ISIceland
INIndia
IDIndonesia
IQIraq
IEIreland
IMIsle of Man
ILIsrael
ITItaly
JMJamaica
JPJapan
JEJersey
JOJordan
KZKazakhstan
KEKenya
KIKiribati
KRKorea
KWKuwait
KGKyrgyzstan
LALaos
LVLatvia
LBLebanon
LSLesotho
LRLiberia
LYLibya
LILiechtenstein
LTLithuania
LULuxembourg
MOMacao
MKMacedonia
MGMadagascar
MWMalawi
MYMalaysia
MVMaldives
MLMali
MTMalta
MHMarshall Islands
MQMartinique
MRMauritania
MUMauritius
YTMayotte
MXMexico
FMMicronesia
MDMoldova
MCMonaco
MNMongolia
MEMontenegro
MSMontserrat
MAMorocco
MZMozambique
MMMyanmar
NANamibia
NRNauru
NPNepal
NLNetherlands
ANNetherlands Antilles
NCNew Caledonia
NZNew Zealand
NINicaragua
NENiger
NGNigeria
NUNiue
NFNorfolk Island
MPNorthern Mariana Islands
NONorway
OMOman
Code Country/Region
PKPakistan
PWPalau
PSPalestine
PAPanama
PGPapua New Guinea
PYParaguay
PEPeru
PHPhilippines
PNPitcairn Islands
PLPoland
PTPortugal
PRPuerto Rico
QAQatar
REReunion
RORomania
RURussian Federation
RWRwanda
BLSaint Barthelemy
SHSaint Helena, Ascension and Tristan da Cunha
KNSaint Kitts and Nevis
LCSaint Lucia
MFSaint Martin
PMSaint Pierre and Miquelon
VCSaint Vincent and the Grenadines
WSSamoa
SMSan Marino
STSao Tome and Principe
SASaudi Arabia
SNSenegal
RSSerbia
SCSeychelles
SLSierra Leone
SGSingapore
SXSint Maarten
SKSlovakia
SISlovenia
SBSolomon Islands
SOSomalia
ZASouth Africa
GSSouth Georgia and the South Sandwich Islands
SSSouth Sudan
ESSpain
LKSri Lanka
SRSuriname
SJSvalbard and Jan Mayen
SZSwaziland
SESweden
CHSwitzerland
TWTaiwan
TJTajikistan
TZTanzania
THThailand
TLTimor-Leste
TGTogo
TKTokelau
TOTonga
TTTrinidad and Tobago
TNTunisia
TRTürkiye (Turkey)
TMTurkmenistan
TCTurks and Caicos Islands
TVTuvalu
UGUganda
UAUkraine
AEUnited Arab Emirates
UMUnited States Minor Outlying Islands
UYUruguay
UZUzbekistan
VUVanuatu
VEVenezuela
VNVietnam
VGVirgin Islands (British)
VIVirgin Islands (US)
WFWallis and Futuna
EHWestern Sahara
YEYemen
ZMZambia
ZWZimbabwe
CUCuba
IRIran
SYSyria
KPNorth Korea

See also:

Parameters

NameTypeDefaultDescription
playerInstanceThe player that you are getting country/region information for.

Returns

TypeDescription
stringA string indicating the country/region code of a player.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Basic"]

Code samples: View on Creator Hub (getting-country-region-code-for-a-player).

LocalizationService:GetTableEntries

Returns an Array, where each element of the returned Array is itself an Array of entries in the same format as described in LocalizationTable:GetEntries(). The order of the elements in the returned Array is the same order that the LocalizationTables will be searched through to attempt automated localization for the provided Instance. The entry elements within a particular LocalizationTable are returned in an unspecified order.

This function returns entries regardless of whether the object is a GuiBase2d with GuiBase2d.AutoLocalize enabled. An object that is a GuiBase2d will not actually be automatically localized unless GuiBase2d.AutoLocalize is enabled.

The ordering of the tables is as follows:

This function does not yield. It will not wait until the cloud LocalizationTable has loaded.

Parameters

NameTypeDefaultDescription
instanceInstancenilThe Instance for which to retrieve the ordered localization table entries. If nil, only entries from the LocalizationService hierarchy and the cloud LocalizationTable are returned.

Returns

TypeDescription
ArrayAn array of arrays, where each array is in the same format as described in LocalizationTable:GetEntries().
FieldValue
securityNone
thread safetyUnsafe
capabilities["Basic"]

LocalizationService:GetTranslatorForLocaleAsync

This function takes a locale code as an argument and yields until the cloud LocalizationTable for that locale has been loaded, if available. It then returns a Translator object which can be used to perform translations for that locale if any are available. The entries used for localization are the entries provided by the LocalizationTable hierarchy under LocalizationService as well as the cloud table (if available). This will be the same set of entries returned by LocalizationService:GetTableEntries(nil).

This function can error and thus should be wrapped in a pcall().

See also:

Parameters

NameTypeDefaultDescription
localestringA Roblox supported language or locale code.

Returns

TypeDescription
InstanceThe Translator instance for the specified locale.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Basic"]

Code samples: View on Creator Hub (getting-and-using-a-translator-for-a-locale).

LocalizationService:GetTranslatorForPlayer

Deprecated. This function has been deprecated by LocalizationService:GetTranslatorForPlayerAsync(), which functions similarly except that it yields until the cloud table has loaded. Please use it in new work instead.

This function takes a player as an argument and returns a Translator instance which can be used to perform translations for that locale if any are available. The entries used for localization are the entries provided by the LocalizationTable hierarchy under LocalizationService as well as the cloud LocalizationTable, if it is available and already loaded. This will be the same set of entries returned by LocalizationService:GetTableEntries(nil).

This function does not yield. It will not wait until the cloud LocalizationTable has loaded.

See also:

Parameters

NameTypeDefaultDescription
playerInstanceThe Player that you are getting the Translator for.

Returns

TypeDescription
InstanceThe Translator instance for the specified locale.
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Basic"]

Code samples: View on Creator Hub (getting-and-using-a-translator-for-a-player).

LocalizationService:GetTranslatorForPlayerAsync

This function takes a player as an argument and yields until the cloud LocalizationTable for that player's locale has been loaded, if available. It then returns a Translator object which can be used to perform translations for that locale if any are available. The entries used for localization are the entries provided by the LocalizationTable hierarchy under LocalizationService as well as the cloud table (if available). This will be the same set of entries returned by LocalizationService:GetTableEntries(nil).

This function can error and thus should be wrapped in a pcall().

See also:

Parameters

NameTypeDefaultDescription
playerInstanceThe Player that you are getting the Translator for.

Returns

TypeDescription
InstanceThe Translator instance for the specified locale.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Basic"]
open cloud equivalents[{"path":"GET /v1/localization-table/tables/{tableId}/entries","relationship":"related","note":"LocalizationService:GetTranslatorForPlayerAsync loads localization data for a player's locale and returns a runtime Translator that also uses in-experience localization tables, whereas GET /v1/localization-table/tables/{tableId}/entries returns raw entries for a specified cloud table without selecting a player locale or creating a Translator."}]

Code samples: View on Creator Hub (getting-and-using-a-translator-for-a-player).

Events

Inherited from Instance

NameType / ReturnsDescription
Instance.AncestryChangedFires when the Instance.Parent property of this object or one of its ancestors is changed.
Instance.AttributeChangedFires whenever an attribute is changed on the Instance.
Instance.ChildAddedFires after an object is parented to this Instance.
Instance.childAdded
Instance.ChildRemovedFires after a child is removed from this Instance.
Instance.DescendantAddedFires after a descendant is added to the Instance.
Instance.DescendantRemovingFires immediately before a descendant of the Instance is removed.
Instance.DestroyingFires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy().
Instance.StyledPropertiesChangedFires whenever any style property is changed on the instance, including when a property is set to nil.

Inherited from Object

NameType / ReturnsDescription
Object.ChangedFires immediately after a property of the object changes, with some limitations.