Game
CesarZ cooks for you! - Clickteam Fusion Examples/Widgets

1 day ago

Simple Localization for Clickteam Fusion 2.5+!

This .mfa includes only the necessary code and tips to implement your own localization system using .csv files to store the texts!

Open the article to get started.


FOR FUSION 2.5+ USERS ONLY, AS THIS .MFA INCLUDES PLUS FEATURES!

You can download the .mfa file in the game page!

How to setup?

We are going to work with .csv files to store the texts, so that's the first thing you need. You can use any spreadsheet editor software to create it!

Make sure your spreadsheet have these requirements:

image.png
  • The first header (id, en, es, fr, ...any other language you want to localize), when you have your all languages, you have to add 1 extra column with a simple "-" in the cell.

  • The keys/ids (menu_title, menu_newGame, general_exit, ...any other text) where you will add the texts to be localized, in the game you will use the key/id to find the text reference by the actual app language.

If you want to update your texts, just modify your spreadsheet and paste your .csv file back into the game, I will explain this part later!

Now download your spreadsheet as a .csv file, hopefully your software will include such option. In general, you should find it in File > Export > Comma-separated values (.csv):

image.png

So you will have your .csv file now ready!

To get my Simple Localization widget working, you need to rename the file as "localization.csv" and put it in the main application folder, like this:

image.png

You should put it on the final build .exe folder, but you can test with your .mfa, of course!

(You can modify the code to make it work with binary data so you don't have to make the file accessible, I'll make a tutorial for that in the future).


Now you need to prepare your app to make my Simple Localization working, so go to your application settings

image.png

On the first screen you don't have touch anything, just go to the last 3rd tab (square grid icon) and do the following settings:

image.png

Open event order and select Global events, Frame events, Behaviours ✅

Tick on Allow alterable values for counters an strings ✅

Now go to the global values tab ("A0" icon) and make sure you are giving space for the first global value and global string, you can name it like these:

image.png

Just for your information, you can modify the code if you want the global values in other index.

on localization_lang you should write the default language, according to the languages name in your .csv file.

image.png

Now your application is fully prepared to implement all the localization system!

Open the Simple Localization by CesarZ .mfa and open the global events.

image.png

If you open the single group event, you will see these tips. Now you want to copy the entire group (I recommend not deleting the comments if you're doing this for the first time) and paste it all into your project.

image.png

The last thing you need to do to make it work is to copy the INI++ "Localization" object from the Localization Objects frame (Simple Localization .mfa) and paste it into all frames of your project.

image.png
image.png

Guess what? Everything is ready!

Now I'll show you how to localize your strings!

image.png

You can check out the example frame from the Simple Localization .mfa to see how this system works.


Open the "Localization Objects" frame and you will find some objects:

  • the already pasted INI++ object.

  • a string object.

  • a list object.

Basically, these objects are ready to be localized because they are preconfigured. For example, the string has some alterable values and a qualifier added:

image.png
image.png

Just copy and paste the object into the frame you need it.

Like this:

image.png

Now go to its alterable values and change the KeyID

image.png

You can assign the KeyID that will reference the text. For example, I'll use the "menu_title" to get the game title text

image.png
image.png

Alright, now you can test and you if you did everything well, you will get the referenced text depending on the default language you have on the "localization_lang" global value.

image.png

Whoa! Now you know how to add localized strings!


There is also a localizable list in the objects holder frame:

image.png

Don't touch the alterable values or flags!

The localizable lists are useful if you want to do backend or technical stuff like options and multiple paragraphs for a string.

To use it, open the list and add the KeyIDs you want, just below the "-" line, it's very important to make this work:

image.png

In runtime, the references will added on top:

image.png

So you just have to retrieve them using the firsts index!

If you want to see a practical use of the lists, check out the example frame:

image.png

For now that's all. I'm planning add new features (without break the older versions) soon.

Last tip, delete the example frame and save the mfa in different path, then add the mfa on the library folder and you will have the localizable objects very accessible!

image.png
image.png

So you can just drag and drop it into the frame you need it.


image.png

There are very useful commands you can use from the INI++ each loop, check it out!

If you have any questions, ask me in the comments, I hope you liked it!



2 comments

Loading...

Next up

Are you ready to witness the aftermath?

@FazbearGameverse 4 will showcase The Springlock: Aftermath on Saturday, 08/24.

Stay tuned!

Things are gonna be crazy. Stay tuned! 🐻🎤

bro

Share with us your #MadeWithFusion games here on Gamejolt in the comments, Fusion made #FNaF fan titles are welcome to join!

help

Check out my side project, Tic Tac Tower, Help the Royal Xnights defeat the evil Ork Captain and reclaim the four towers in the worlds first Tic Tac Toe RPG! Let me know if I am just out of my mind or not....

https://gamejolt.com/games/TicTacTower/894181

I solved the DBD x FNAF collab.

TEASER TRAILER - DEMO OUT NOW

reminder to never do these.

credit: @FateForWindows

Hopefully tomorrow.