Home / how to / Creating a multi-language project with Kwik – Part 2

Creating a multi-language project with Kwik – Part 2

In the past tutorial, I setup the project for a multi-language experience. In this posting, I will teach how to configure images (layers) and audio to just show up when the corrected language is selected.

Adding audio files to the project

In page2, there is a line of text (for each language) that needs to be associated with an audio file. In order to enable multi-language to audio, name it audio with the same name. For example, if you have an audio called narration.mp3, name it eng_narration.mp3 for the English version and spa_narration.mp3, for the Spanish version.

After renaming my audio files to the correct setup, I am ready to import them, using the Pages->Add Audio option. It will open the following window:

Screen shot 2011-12-11 at 12.59.19 PM

Browse to the location of your first file (order is not important here), in this case I picked the English one. I set it as This is the page Read Me audio file, disabled the loop (it will play only once), and selected the (new) Languages popup as English. Just after doing it, I previewed the project again. See the results:

Yes, when you imported the first multi-language audio, Kwik will import all other audio (it works for video too) named with the above convention (3-same-letters-used-for-the-languageID_audioname).

Setting image layers (layers used as animations or static image)

Now, let’s select only the correct line of text for each language (I will cover Sync text feature in another posting). Selecting layer father (or padre, as order is not important here), then going to Tools->Set language to a layer (the new button), a window opens:

Screen shot 2011-12-11 at 1.14.03 PM

The first parameter Multi-layer, allows me to create a group for all related images. As my only option at this moment is “** NEW **”, I accepted that. As I am in the father layer, I picked the English language in the Languages popup.

Now, I selected the layer padre, and do the same for this layer. The difference now is the fact I pick father in the Multi-layer popup, as I am associating the layer padre to this already created group. I selected the Spanish, as this is the correct language for this layer.

Screen shot 2011-12-11 at 1.19.29 PM

As you can see in the plugin’s panel, the last two Set Language commands are represented in the panel. Like other page components, a double-click edits them.

Screen shot 2011-12-11 at 1.20.03 PM

This is how the project works after another preview:

In the next posting I will cover animations and buttons. Comments? They are welcomed!


  • Is there a way to set the default language to the device language? What are the country codes used? Not the ISO format en-EN as I see…is there a list available?

    • As I mentioned in the other comment, you will need to do it manually as Kwik currently does not have this option. Take a look on the HelloWorldLocalized sample (available in Corona SDK installation folder) to learn how. The list of countries seems to follow this rule here: http://en.wikipedia.org/wiki/ISO_3166-1

  • Doesn’t work for me… i have a splash page with the flags as buttons and a page with a form module with a group of layers with language set. if i assign to the buttons only the gotopage action no problem (but obviously the layers with language set are not visible) if i add the setlanguage action to the same button as you said in the tutorial it does not change the page but shows the same page cutted in half for a millisec and nothing more…what do i do? 🙁

    • Don’t know if I understood the issue here (sorry). If you add the Set Language action, you have an option to go to another page or keep in the same (which will redraw the current page). In this case, if you have layers set to different languages, they will show up accordingly.

  • mmmh… nope. If i click on the icon “Set Language” in the button panel it gives me a box with:
    Select Language:
    Language: select box with languages i made
    And that’s all, no signs of the option for keeping current page or go to another page. In facts, in the part 1 of this tutorial also the screenshot you posted show this box exactly as I see it now and after that screenshot you wrote:

    “I then picked the English as this is the English button, right?
    After adding the Set Language action, I also entered a GoToPage, sending it to the next page after the click.”

    No talking about this option… or I simply don’t understand where it is. Please help.

  • I am already crossing Kwik 1 and Kwik 2 interfaces (sorry). You are right. You need to select a language and enter another action to Go to another page. This is the correct way to set it, as described in the tutorial. So, still do not understand what is expected and what is the issue. By the way, considering this is a support topic, can you please open a request using the forums?

  • absolutely. Sorry. By the way the issue is that i’ve done like you just said but if I add 2 actions (set Language and Go to page) it doesn’t change the page. if i remove the “set language” action it changes the page with no problems. Thanks for your time 🙂

    • Federico, I updated the information about the buttons in the posting 1. Please take a look and you will understand why the demo is not the same as recorded.

Leave a Reply

Your email address will not be published. Required fields are marked *