# \[Extension\] Localization - translate your games a \*little\* easier!

**URL:** https://forum.makecode.com/t/extension-localization-translate-your-games-a-little-easier/42457
**Category:** Show & Tell
**Tags:** extension
**Created:** [March 2, 2026, 7:13pm UTC](https://forum.makecode.com/t/extension-localization-translate-your-games-a-little-easier/42457 "2026-03-02T19:13:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)
#### Post date: [March 2, 2026, 7:13pm UTC](https://forum.makecode.com/t/extension-localization-translate-your-games-a-little-easier/42457/1 "2026-03-02T19:13:14Z")

</div>

Hi everyone, coming at you with a slightly smaller extension today after a longer hiatus. Hopefully I will get around to releasing some more interesting stuff in the following weeks but enjoy this treat for now.

# Localization (L10N)

Before you ask, **no** , this extension is **NOT** a translator. MakeCode is unfortunately far too limited to implement such a system. However, it doesn’t mean that translating your games is impossible in MakeCode. Far from it actually, as I have already demonstrated in my most popular game, [Deliverimania!](https://forum.makecode.com/t/deliverimania-a-fast-paced-infinite-runner-game/20309)

I used a proprietary system in place to translate the game manually. I managed to make it quite organized and modular which certainly sped up the process of implementing new terms and languages into my game, but not everyone is capable or willing to go to such lengths for a feature most people will never even interact with.

However, translating your game into a few prominent languages can be a nice final touch to an already polished game. So, I decided to take on the task of creating an extension that will streamline that process for everyone else in order to motivate coders to give a second thought to that idea. This extension makes it easy to define phrases that can be localized manually by yourself (if you’re multilingual) or contributors and inserted into your game depending on which language is selected.

> **Blocks**
>
> This extension adds 9 simple blocks for you to work with. Here is a breakdown:
> 
> ## Create language
> 
> Pretty self explanatory, this block creates a language block that will store all the phrases for a specific language in your game/project.
> 
> ![Create new language](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/f/3/f3d1c4b255937b9ff1e897d5b78fb22dcb4e6ce6.png)
> 
> You can define a custom code and name for your language, as well as an optional _native name_, which is what the name of the language would be referred to in that language.
> 
> ![Create new language with native name](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/8/58673e7d991dde9afdfc507aacbbed6b4521b68a.png)
> 
> In case the native name isn’t defined, it will default to the standard language name.
> 
> ## Set phrase (key)
> 
> This block defines a phrase in a given language for a specific key. In case the key is already defined, it will override its value with a new value.
> 
> ![Set phrase](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/a/6a0e6e860090da814d9bfc4910cfb66e3b041267.png)
> 
> ## Set language
> 
> This blocks takes in a language object and applies it as the current language project-wide. By default, there is no language set upon game start, meaning it’s set to `undefined`.
> 
> ![Set language](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/1/0/105397efdba2654d13bb81153068b3b6e8837b49.png)
> 
> ## Localize
> 
> This is the most important block, because it’s used to actually get the translated string by key from the **current** language.
> 
> ![Localize](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/d/5d4cd3e191c6d502ab332f5c05be335f1515d324.png)
> 
> Optionally, you can pass in arguments to format the string (we’ll get to this later)
> 
> ![Localize with args](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/c/9/c91614bb5fae3ef252fd2674b8fa9351b30a4e81.png)
> 
> This block returns a string.
> 
> ### Exceptions
> 
> - This block will throw an exception if a language isn’t currently set  
> `Language locale is undefined`
> - This block will throw an exception if the key used isn’t defined in the current language  
> `Identifier '[key]' not found in locale '[code]'`
> 
> ## Localize with
> 
> Very similar to the previous block, but this one takes a specific language object to localize with, instead of using the currently applied one.
> 
> ![Localized in language](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/1/519bdb6c9fb35fc18d3cbfdfa62fedf6bf34d3b1.png)
> 
> Just like its counterpart, it can take in arguments for formatting.
> 
> ![Localized in language with args](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/0/6/06862d355fe3f1e915320a438047955d4d8aa717.png)
> 
> ### Exceptions
> 
> - This block will throw an exception if the key used isn’t defined in the current language  
> `Identifier '[key]' not found in locale '[code]'`
> 
> ## Unset language
> 
> If for some reason, you want to set the current language to `null` (remove it), you can do it with this block.
> 
> ![Unset language](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/0/9/099df7bfd61f179dab3602f181d1029af34ac41c.png)
> 
> ## Get current language
> 
> Returns the language object that’s currently set.
> 
> ![Get current language](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/8/4/84f9e88de3b47d068dec251ad1c694e2ecb454f2.png)
> 
> ## Get language attribute
> 
> This block is used to retrieve attributes defined for a language object.
> 
> ![Get language attribute](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/0/5/05d02d97078f6d1756da4d6f4b2c17276fe45934.png)
> 
> Available attributes are
> 
> - Code (eg. en-US)
> - Name
> - Native name
> 
> ## Is language set
> 
> Checks if a language is currently set (non-null value)  
> Useful for preventing exceptions
> 
> ![Is language set](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/9/f/9f4a7d4a6e59a8064461c0a4d46c4402c410baba.png)

> **Formatting**
>
> Wondering what the optional arguments in the localize blocks are for? This extension natively supports my [String formatting](https://forum.makecode.com/t/extension-string-formatting-format-strings/28539) extension! Meaning, you can translate strings that contain dynamic values as well!
> 
> > [@\[Extension\] String formatting - ...format strings](https://forum.makecode.com/t/extension-string-formatting-format-strings/28539/1):
> >
> > ## How to use
> > 
> > The extension works on a very simple principle. Use open curly brackets (“`{}`”) to create a placeholder in your string. Once you use the format method, the placeholders will be filled in from left to right with the provided parameters. Here’s an example:
> > 
> > ![arcade-screenshot](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/7be7f13e6b97c7106ef5ea9f8615b384fb1bd1a0.png)
> > 
> > In this example, “8” will be mapped to the first field, “14” to the second, and “44” to the third. Those placeholders will be replaced by the values and the output will be “8:14:44”.
> 
> The extension is already included and implemented, so all you have to do is use the formatting notation in your phrases and insert the arguments using the provided blocks.

Here’s a simple example on how you can use this extension in your project I made using Richard’s mini menu extension to set the language and then displayed the strings using my own extension!

> **[Localization example](https://arcade.makecode.com/S49005-84409-68043-28630)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Thanks for reading! You can get the extension here

> **[GitHub - sargedev/l10n: Localization extension](https://github.com/sargedev/l10n)**
>
> Localization extension

---

<div class="post-metadata">

### Author: ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)
#### Post date: [March 2, 2026, 8:33pm UTC](https://forum.makecode.com/t/extension-localization-translate-your-games-a-little-easier/42457/2 "2026-03-02T20:33:55Z")

</div>

So…

If this isn’t a translator, why should we use this?

* * *

> [@richard](#):
>
> if you want to have people translate your game (or you know more than one language yourself) then this makes it easy to swap the text out at runtime.
> 
> we use a system very similar to this for makecode itself, and so does basically every bit of software/video game that supports multiple languages

So it’s open source translator? I see.

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [March 2, 2026, 8:36pm UTC](https://forum.makecode.com/t/extension-localization-translate-your-games-a-little-easier/42457/3 "2026-03-02T20:36:08Z")

</div>

if you want to have people translate your game (or you know more than one language yourself) then this makes it easy to swap the text out at runtime.

we use a system very similar to this for makecode itself, and so does basically every bit of software/video game that supports multiple languages

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [March 2, 2026, 10:40pm UTC](https://forum.makecode.com/t/extension-localization-translate-your-games-a-little-easier/42457/4 "2026-03-02T22:40:22Z")

</div>

This is neat, and very useful for polishing! 😃

---

<div class="post-metadata">

### Author: ![TheEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/theearth/32/34579_2.png) [@TheEarth](https://forum.makecode.com/u/TheEarth)
#### Post date: [March 6, 2026, 5:40pm UTC](https://forum.makecode.com/t/extension-localization-translate-your-games-a-little-easier/42457/5 "2026-03-06T17:40:23Z")

</div>

Maybe I’ll use this for elemental and transla-- … nah I’ll let someone else do it
