Hash based multi language solution

UpvoteUpvote 2 DownvoteDownvote

Index

Features on these Courses

Attached Files

The following files have been attached to this tutorial:

.c3p

multi-language-using-hash.c3p

Download now 170.6 KB

Stats

210 visits, 326 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 1 May, 2025. Last updated 2 May, 2025

Import language file

I will use a spreadsheet to manage the Strings. For example:

  • String
    en-US pt-BR es-ES zh-CN
    Let's win this game! Vamos ganhar esse jogo! ¡Vamos a ganar este juego! 让我们赢下这场游戏!
    You're amazing! Você é incrível! ¡Eres increíble! 你太厉害了!
    I found a secret passage. Eu encontrei um corredor secreto. He encontrado un pasaje secreto. 我发现了一条秘密通道。
    Hurry up! Apresse-se! ¡Date prisa! 快点!
    Good luck! Boa sorte! ¡Buena suerte! 祝你好运!
  • Variable

    It also supports the use of the BBCode or {0}, {1}... variable placeholder supported in C3

    en-US pt-BR es-ES zh-CN
    I just defeated [b]{0} with [color=#00FF00]{1}[/color]! Eu acabei de derrotar [b]{0}[/b] com [color=#00FF00]{1}[/color]! Acabo de derrotar [b]{0}[/b] con [color=#00FF00]{1}[/color]! 我刚刚用 [color=#00FF00]{1}[/color] 打败了 [b]{0}[/b]!
    The [tag=powerup]{0}[/tag] [icon=power] gives you extra power. O [tag=powerup]{0}[/tag] [icon=power] te dá poder extra. El [tag=powerup]{0}[/tag] [icon=power] te da poder extra. 这个 [tag=powerup]{0}[/tag] [icon=power] 会给你额外的力量。
    You need to collect {0} [icon=coin] coins to unlock the next level. Você precisa coletar {0} [icon=coin] moedas para desbloquear o próximo nível. Necesitas recolectar {0} [icon=coin] monedas para desbloquear el siguiente nivel. 你需要收集 {0} [icon=coin] 个金币来解锁下一关。
    [b]Warning![/b] {0} is approaching fast! [b]Atenção![/b] {0} está se aproximando rápido! [b]¡Advertencia![/b] {0} se está acercando rápido! [b]警告![/b] {0} 正在快速逼近!
    Equip the [color=#0000FF]{0}[/color] [icon=sword] to increase your attack. Equipe o [color=#0000FF]{0}[/color] [icon=sword] para aumentar seu ataque. Equipa el [color=#0000FF]{0}[/color] [icon=sword] para aumentar tu ataque. 装备 [color=#0000FF]{0}[/color] [icon=sword] 可以提高你的攻击力。

You can even save it directly in a Array file in Construct 3.

{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-start-of-layout","objectClass":"System"}],"actions":[{"id":"request-project-file","objectClass":"AJAX","parameters":{"tag":"\"\"","file":"lang.json"}},{"id":"wait-for-previous-actions","objectClass":"System"},{"id":"load","objectClass":"Array","parameters":{"json":"AJAX.LastData"}}]}]}

Or You can manage it in Excel, or host it in Google Sheets. Then export them as UTF-8 encoded CSV files.

{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-start-of-layout","objectClass":"System"}],"actions":[{"id":"request-project-file","objectClass":"AJAX","parameters":{"tag":"\"\"","file":"lang.csv"}},{"id":"wait-for-previous-actions","objectClass":"System"},{"id":"parse-csv","objectClass":"CSV","parameters":{"csv":"AJAX.LastData","delimiter":"\",\"","array":"Array","data-type":"auto"}}]}]}
  • 0 Comments

Want to leave a comment? Login or Register an account!