← All help pages

Add an image in language versions

A picture sometimes contains a caption, for example a board with a slogan in Polish. In an exercise in several languages, each language then needs its own file. An asset (a file in the Assets window) can be one of two kinds:

Before you start: the exercise has at least two languages (see Exercise languages), and there is an Image with a file on the scene. In the screenshots the exercise has three languages: Polish (default), English and German. For English we point to a banana instead of the apple only to make the difference visible; in a real exercise, choose the same picture with the caption in the other language.

Language keys under the asset card

  1. Open the Assets window: click the Asset library icon on the toolbar or the folder icon next to the Image in the inspector. Under the card of every asset there is a row of small buttons, one for each language of the exercise (marker 1). We call them language keys.

    The Assets window with the card of the asset apple.png and under it a row of language keys pl, en and de, marked with the number 1

  2. The key of the default language shows the file of the asset. The other keys are empty because the asset is common for now: all the languages use the same file. When you point at a key, a hint tells you what is going on with it.

Add a file for a second language

  1. Click the key of the language you want to add a file for, for example en (marker 1). A panel appears above the footer of the window: the name of the asset and the language, and below it a note that the asset is common and that adding a file will make it a language asset, which needs files for all languages.

    The key en (1) and the Add a file button (2) in the panel under the asset card

  2. Click Add a file (marker 2) and choose the file on your computer.

  3. The panel shows the name of the added file and the buttons Replace the file (marker 2) and Remove the file (marker 3). The en key (marker 1) now has a file, and the asset is a language one: every language has its own file.

    The panel of the en key with a file: the key (1), the buttons Replace the file (2) and Remove the file (3)

Fill in the other languages

A language asset must have a file in every language of the exercise. When you add a file for the first language other than the default one, the remaining languages get a red dot on their keys: the file is missing there.

  1. Click the key of a language with a red dot, for example de (marker 1). The panel says that the file is missing and that every language must have a file.

  2. Click Add a file (marker 2) and choose the file. The dot disappears.

    The key de with a red dot (1) and the Add a file button (2) in the panel

  3. If you forget a language and the asset is used on the scene, the editor does not let you run or export the exercise. Open the Project validation window (the problem counter on the toolbar). A row says that the asset is a language one and has no files for the listed languages (marker 1). Click it: the window closes and the library opens on this asset, on the key of the missing language. Add the file as in step 2.

    The Project validation window with a row about the missing files of the asset apple.png, marked with the number 1

See the file in the chosen language

  1. On the bar of the Scene panel, click a language switch, for example en (marker 1). The Image on the scene (marker 2) shows the file of that language. In the default language you see the file of the default language.

    The scene after clicking the en switch (1): the Image shows the English file, the banana (2)

  2. Click Run. The exercise runs in the language chosen on the stage bar and shows the file of that language. More about running: Make an exercise in several languages.

Replace or remove the file of a language

  1. Click the key of a language that has a file, and in the panel click Replace the file or Remove the file.
  2. You cannot remove the file of the default language as long as the asset has files in other languages. The Remove the file button is then faded, and its hint says: “First remove the files of the other languages or change the default language.”
  3. When only one file is left after removing, the asset is common again with that file. The Remove the file button is then faded, and its hint says: “This is the only file of the asset — remove the whole asset with “Remove asset”.” You remove the whole asset with the Delete asset button in the lower part of the window.

Change the default language or remove a language

Common mistakes