# Defold Polyglot

**URL:** <https://forum.defold.com/t/defold-polyglot/69144>\
**Category:** The Defoldmine\
**Created:** [August 25, 2021, 1:30pm UTC](https://forum.defold.com/t/defold-polyglot/69144 "2021-08-25T13:30:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pawel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pawel/32/24623_2.png) [@Pawel](https://forum.defold.com/u/Pawel)\
**Post date:** [August 25, 2021, 1:30pm UTC](https://forum.defold.com/t/defold-polyglot/69144/1 "2021-08-25T13:30:49Z")

</div>

Hi!

I managed to create a very simple module for game localisations in Defold that utilizes open-source Polyglot sheet available [here.](https://docs.google.com/spreadsheets/d/17f0dQawb-s_Fd7DHgmVvJoEGDMH_yoSd8EYigrb0zmM)

 ![logo](https://forum-defold.b-cdn.net/uploads/default/original/3X/7/d/7d3087916a598325bd08eb6b3ce6b03204f09cb1.jpeg)

Defold Polyglot is a tool that parses downloaded Polyglot CSV file and you can use it in Defold (or possibly any Lua based) project. It is available (MIT - free open-sourced) in the link below:

[https://github.com/paweljarosz/defold-polyglot](https://github.com/paweljarosz/defold-polyglot)

The instructions and API description are in README.md

Example usage:

```lua
-- 1. import resource
polyglot.import("/assets/polyglot.csv")

-- 2. set language
polyglot.set_language("Polish")

-- 3. use proper string_id in getter
local translation = polyglot.get("CONTEXT_CLASS_WARRIOR")

label.set_text("#label", "Warrior in Polish is: "..translation)

```

Project includes Defold example project which has an output:

 ![image](https://forum-defold.b-cdn.net/uploads/default/original/3X/1/0/109e20c4e43776fb62d16232642be0f42c860154.png)

I hope you will like it! Ideally, it would be great to merge it to [DefGlot](https://github.com/subsoap/defglot), as it is far more advanced 😉
