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
| Name | Type / Returns | Description |
|---|---|---|
| LocalizationService.RobloxLocaleId | string | The locale ID used for localizing core and internal features. |
| LocalizationService.SystemLocaleId | string | The locale ID that the local player has set for their operating system. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.Archivable | boolean | Determines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published. |
| Instance.archivable | boolean | |
| Instance.Capabilities | SecurityCapabilities | The set of capabilities allowed to be used for scripts inside this container. |
| Instance.IsInSandbox | boolean | Indicates whether the instance is inside a sandboxed container. |
| Instance.Name | string | A non-unique identifier of the Instance. |
| Instance.Parent | Instance | Determines the hierarchical parent of the Instance. |
| Instance.PredictionMode | PredictionMode | Reflects the client-side prediction mode applied to the instance under server-authoritative physics. |
| Instance.RobloxLocked | boolean | A deprecated property that used to protect CoreGui objects. |
| Instance.Sandboxed | boolean | When enabled, the instance can only access abilities in its Capabilities list. |
| Instance.UniqueId | UniqueId | A unique identifier for the instance. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.ClassName | string | A read-only string representing the class this Object belongs to. |
| Object.className | string |
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.
| Field | Value |
|---|---|
| type | string |
| tags | ["ReadOnly","NotReplicated"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Localization |
| 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.
| Field | Value |
|---|---|
| type | string |
| tags | ["ReadOnly","NotReplicated"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Localization |
| serialization | {"can_load":false,"can_save":false} |
| capabilities | ["Basic"] |
Methods
| Name | Type / Returns | Description |
|---|---|---|
| LocalizationService:GetCorescriptLocalizations | Instances | Returns a list of LocalizationTable objects used for localizing core scripts. |
| LocalizationService:GetCountryRegionForPlayerAsync | string | Returns country/region code string according to player's client IP geolocation. |
| LocalizationService:GetTableEntries | Array | Gets all entries used for automated localization. |
| LocalizationService:GetTranslatorForLocaleAsync | Instance | Yields 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:GetTranslatorForPlayer | Instance | Returns a Translator to be used for translations using the locale data loaded. |
| LocalizationService:GetTranslatorForPlayerAsync | Instance | Yields 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
| Name | Type / Returns | Description |
|---|---|---|
| Instance:AddTag | () | Applies a tag to the instance. |
| Instance:children | Instances | Returns an array of the object's children. |
| Instance:ClearAllChildren | () | This method destroys all of an instance's children. |
| Instance:Clone | Instance | Create a copy of an instance and all its descendants, ignoring instances that are not Archivable. |
| Instance:clone | Instance | |
| 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:FindFirstAncestor | Instance? | Returns the first ancestor of the Instance whose Instance.Name is equal to the given name. |
| Instance:FindFirstAncestorOfClass | Instance? | Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className. |
| Instance:FindFirstAncestorWhichIsA | Instance? | Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstChild | Instance? | Returns the first child of the Instance found with the given name. |
| Instance:findFirstChild | Instance | |
| Instance:FindFirstChildOfClass | Instance? | Returns the first child of the Instance whose ClassName is equal to the given class name. |
| Instance:FindFirstChildWhichIsA | Instance? | Returns the first child of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstDescendant | Instance? | Returns the first descendant found with the given Instance.Name. |
| Instance:GetActor | Actor? | Returns the Actor associated with the Instance, if any. |
| Instance:GetAttribute | Variant | Returns the value which has been assigned to the given attribute name. |
| Instance:GetAttributeChangedSignal | RBXScriptSignal | Returns an event that fires when the given attribute changes. |
| Instance:GetAttributes | Dictionary | Returns a dictionary of the instance's attributes. |
| Instance:GetChildren | Instances | Returns an array containing all of the instance's children. |
| Instance:getChildren | Instances | |
| Instance:GetDebugId | string | Returns a coded string of the debug ID used internally by Roblox. |
| Instance:GetDescendants | Instances | Returns an array containing all of the descendants of the instance. |
| Instance:GetFullName | string | Returns a string describing the instance's ancestry. |
| Instance:GetStyled | Variant | Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. |
| Instance:GetStyledPropertyChangedSignal | RBXScriptSignal | Returns an event that fires when the given style property changes on the instance. |
| Instance:GetTags | Array | Gets an array of all tags applied to the instance. |
| Instance:HasTag | boolean | Check whether the instance has a given tag. |
| Instance:IsAncestorOf | boolean | Returns true if an Instance is an ancestor of the given descendant. |
| Instance:IsDescendantOf | boolean | Returns true if an Instance is a descendant of the given ancestor. |
| Instance:isDescendantOf | boolean | |
| Instance:IsPropertyModified | boolean | Returns true if the value stored in the specified property is not equal to the code-instantiated default. |
| Instance:QueryDescendants | Instances | Returns 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:WaitForChild | Instance | Returns 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
| Name | Type / Returns | Description |
|---|---|---|
| Object:GetPropertyChangedSignal | RBXScriptSignal | Get an event that fires when a given property of the object changes. |
| Object:IsA | boolean | Returns true if an object's class matches or inherits from a given class. |
| Object:isA | boolean |
LocalizationService:GetCorescriptLocalizations
Returns a list of LocalizationTable objects used for localizing core scripts.
Returns
| Type | Description |
|---|---|
| Instances | A list of LocalizationTable objects used for localizing CoreScripts. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| 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 |
|---|---|
| XX | Unknown Country |
| US | United States |
| GB | United Kingdom |
| CA | Canada |
| AF | Afghanistan |
| AX | Aland Islands |
| AL | Albania |
| DZ | Algeria |
| AS | American Samoa |
| AD | Andorra |
| AO | Angola |
| AI | Anguilla |
| AQ | Antarctica |
| AG | Antigua and Barbuda |
| AR | Argentina |
| AM | Armenia |
| AW | Aruba |
| AU | Australia |
| AT | Austria |
| AZ | Azerbaijan |
| BS | Bahamas |
| BH | Bahrain |
| BD | Bangladesh |
| BB | Barbados |
| BY | Belarus |
| BE | Belgium |
| BZ | Belize |
| BJ | Benin |
| BM | Bermuda |
| BT | Bhutan |
| BO | Bolivia |
| BQ | Bonaire, Saint Eustatius and Saba |
| BA | Bosnia and Herzegovina |
| BW | Botswana |
| BV | Bouvet Island |
| BR | Brazil |
| IO | British Indian Ocean Territory |
| BN | Brunei Darussalam |
| BG | Bulgaria |
| BF | Burkina Faso |
| BI | Burundi |
| KH | Cambodia |
| CM | Cameroon |
| CV | Cape Verde |
| KY | Cayman Islands |
| CF | Central African Republic |
| TD | Chad |
| CL | Chile |
| CN | China |
| CX | Christmas Island |
| CC | Cocos Islands |
| CO | Colombia |
| KM | Comoros |
| CG | Congo |
| CD | Congo (DRC) |
| CK | Cook Islands |
| CR | Costa Rica |
| CI | Ivory Coast |
| HR | Croatia |
| CW | Curaçao |
| CY | Cyprus |
| CZ | Czech Republic |
| DK | Denmark |
| DJ | Djibouti |
| DM | Dominica |
| DO | Dominican Republic |
| EC | Ecuador |
| EG | Egypt |
| SV | El Salvador |
| GQ | Equatorial Guinea |
| ER | Eritrea |
| EE | Estonia |
| ET | Ethiopia |
| FK | Falkland Islands (Malvinas) |
| FO | Faroe Islands |
| FJ | Fiji |
| FI | Finland |
| FR | France |
| GF | French Guiana |
| PF | French Polynesia |
| TF | French Southern Territories |
| GA | Gabon |
| GM | Gambia |
| GE | Georgia |
| DE | Germany |
| Code | Country/Region |
|---|---|
| GH | Ghana |
| GI | Gibraltar |
| GR | Greece |
| GL | Greenland |
| GD | Grenada |
| GP | Guadeloupe |
| GU | Guam |
| GT | Guatemala |
| GG | Guernsey |
| GN | Guinea |
| GW | Guinea-Bissau |
| GY | Guyana |
| HT | Haiti |
| HM | Heard Island and the McDonald Islands |
| VA | Holy See |
| HN | Honduras |
| HK | Hong Kong |
| HU | Hungary |
| IS | Iceland |
| IN | India |
| ID | Indonesia |
| IQ | Iraq |
| IE | Ireland |
| IM | Isle of Man |
| IL | Israel |
| IT | Italy |
| JM | Jamaica |
| JP | Japan |
| JE | Jersey |
| JO | Jordan |
| KZ | Kazakhstan |
| KE | Kenya |
| KI | Kiribati |
| KR | Korea |
| KW | Kuwait |
| KG | Kyrgyzstan |
| LA | Laos |
| LV | Latvia |
| LB | Lebanon |
| LS | Lesotho |
| LR | Liberia |
| LY | Libya |
| LI | Liechtenstein |
| LT | Lithuania |
| LU | Luxembourg |
| MO | Macao |
| MK | Macedonia |
| MG | Madagascar |
| MW | Malawi |
| MY | Malaysia |
| MV | Maldives |
| ML | Mali |
| MT | Malta |
| MH | Marshall Islands |
| MQ | Martinique |
| MR | Mauritania |
| MU | Mauritius |
| YT | Mayotte |
| MX | Mexico |
| FM | Micronesia |
| MD | Moldova |
| MC | Monaco |
| MN | Mongolia |
| ME | Montenegro |
| MS | Montserrat |
| MA | Morocco |
| MZ | Mozambique |
| MM | Myanmar |
| NA | Namibia |
| NR | Nauru |
| NP | Nepal |
| NL | Netherlands |
| AN | Netherlands Antilles |
| NC | New Caledonia |
| NZ | New Zealand |
| NI | Nicaragua |
| NE | Niger |
| NG | Nigeria |
| NU | Niue |
| NF | Norfolk Island |
| MP | Northern Mariana Islands |
| NO | Norway |
| OM | Oman |
| Code | Country/Region |
|---|---|
| PK | Pakistan |
| PW | Palau |
| PS | Palestine |
| PA | Panama |
| PG | Papua New Guinea |
| PY | Paraguay |
| PE | Peru |
| PH | Philippines |
| PN | Pitcairn Islands |
| PL | Poland |
| PT | Portugal |
| PR | Puerto Rico |
| QA | Qatar |
| RE | Reunion |
| RO | Romania |
| RU | Russian Federation |
| RW | Rwanda |
| BL | Saint Barthelemy |
| SH | Saint Helena, Ascension and Tristan da Cunha |
| KN | Saint Kitts and Nevis |
| LC | Saint Lucia |
| MF | Saint Martin |
| PM | Saint Pierre and Miquelon |
| VC | Saint Vincent and the Grenadines |
| WS | Samoa |
| SM | San Marino |
| ST | Sao Tome and Principe |
| SA | Saudi Arabia |
| SN | Senegal |
| RS | Serbia |
| SC | Seychelles |
| SL | Sierra Leone |
| SG | Singapore |
| SX | Sint Maarten |
| SK | Slovakia |
| SI | Slovenia |
| SB | Solomon Islands |
| SO | Somalia |
| ZA | South Africa |
| GS | South Georgia and the South Sandwich Islands |
| SS | South Sudan |
| ES | Spain |
| LK | Sri Lanka |
| SR | Suriname |
| SJ | Svalbard and Jan Mayen |
| SZ | Swaziland |
| SE | Sweden |
| CH | Switzerland |
| TW | Taiwan |
| TJ | Tajikistan |
| TZ | Tanzania |
| TH | Thailand |
| TL | Timor-Leste |
| TG | Togo |
| TK | Tokelau |
| TO | Tonga |
| TT | Trinidad and Tobago |
| TN | Tunisia |
| TR | Türkiye (Turkey) |
| TM | Turkmenistan |
| TC | Turks and Caicos Islands |
| TV | Tuvalu |
| UG | Uganda |
| UA | Ukraine |
| AE | United Arab Emirates |
| UM | United States Minor Outlying Islands |
| UY | Uruguay |
| UZ | Uzbekistan |
| VU | Vanuatu |
| VE | Venezuela |
| VN | Vietnam |
| VG | Virgin Islands (British) |
| VI | Virgin Islands (US) |
| WF | Wallis and Futuna |
| EH | Western Sahara |
| YE | Yemen |
| ZM | Zambia |
| ZW | Zimbabwe |
| CU | Cuba |
| IR | Iran |
| SY | Syria |
| KP | North Korea |
See also:
PolicyService:GetPolicyInfoForPlayerAsync(), returns policy information about a player which is based on geolocation, age group and platform
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| player | Instance | The player that you are getting country/region information for. |
Returns
| Type | Description |
|---|---|
| string | A string indicating the country/region code of a player. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | None |
| thread safety | Unsafe |
| 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:
- First, it looks for the earliest
GuiBase2dancestor of the object (including the provided object) that has aGuiBase2d.RootLocalizationTable. Tables then append in the same order as described inGuiBase2d.RootLocalizationTableby going up through theLocalizationTableancestors of thatGuiBase2d.RootLocalizationTable. If no suchGuiBase2d.RootLocalizationTableis found, no tables append in this step. Ifinstanceisnil, no tables append in this step. - Next, tables from the
LocalizationTablehierarchy underLocalizationServiceappend. For each childLocalizationTableofLocalizationService, it appends tables going up from the lowest descendantLocalizationTableof the tables parented to the service, all the way up to the children of the service. If there are no children ofLocalizationServicethat areLocalizationTables, then no tables append in this step. - Finally, the cloud
LocalizationTableappends to the array. If there is no cloudLocalizationTable, or the cloudLocalizationTablehas not yet loaded, then no table appends in this step.
This function does not yield. It will not wait until the cloud LocalizationTable has loaded.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| instance | Instance | nil | The 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
| Type | Description |
|---|---|
| Array | An array of arrays, where each array is in the same format as described in LocalizationTable:GetEntries(). |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| 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:
LocalizationService:GetTranslatorForPlayer()gets the translator corresponding to the locale of the provided player. This function is deprecated and should not be used in new work.LocalizationService:GetTranslatorForPlayerAsync()yields until the cloudLocalizationTablefor the locale of the provided player has loaded and then gets the translator corresponding to the locale of the provided player.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| locale | string | A Roblox supported language or locale code. |
Returns
| Type | Description |
|---|---|
| Instance | The Translator instance for the specified locale. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | None |
| thread safety | Unsafe |
| 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:
LocalizationService:GetTranslatorForPlayerAsync()has the same functionality as this function, except that it yields until the cloudLocalizationTablehas been loaded.LocalizationService:GetTranslatorForLocaleAsync(), returns a Translator to be used for translations using the provided locale.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| player | Instance | The Player that you are getting the Translator for. |
Returns
| Type | Description |
|---|---|
| Instance | The Translator instance for the specified locale. |
| Field | Value |
|---|---|
| tags | ["Deprecated"] |
| security | None |
| thread safety | Unsafe |
| 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:
LocalizationService:GetTranslatorForPlayer(), same functionality as this function except that it does not yield and does not wait until the cloudLocalizationTablefor the player's locale has been loaded. This function is deprecated and should not be used in new work.LocalizationService:GetTranslatorForLocaleAsync(), returns a Translator to be used for translations using the provided locale.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| player | Instance | The Player that you are getting the Translator for. |
Returns
| Type | Description |
|---|---|
| Instance | The Translator instance for the specified locale. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | None |
| thread safety | Unsafe |
| 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
| Name | Type / Returns | Description |
|---|---|---|
| Instance.AncestryChanged | Fires when the Instance.Parent property of this object or one of its ancestors is changed. | |
| Instance.AttributeChanged | Fires whenever an attribute is changed on the Instance. | |
| Instance.ChildAdded | Fires after an object is parented to this Instance. | |
| Instance.childAdded | ||
| Instance.ChildRemoved | Fires after a child is removed from this Instance. | |
| Instance.DescendantAdded | Fires after a descendant is added to the Instance. | |
| Instance.DescendantRemoving | Fires immediately before a descendant of the Instance is removed. | |
| Instance.Destroying | Fires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy(). | |
| Instance.StyledPropertiesChanged | Fires whenever any style property is changed on the instance, including when a property is set to nil. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.Changed | Fires immediately after a property of the object changes, with some limitations. |