Multi-Language Programming in Small Basic

I’d like to introduce three multi-language programs for answering a forum thread: How i can add multi language program ? asked by MehmetTR.

The first one is the easiest TextWindow sample.  The array msg is for multi-language texts.  You can get nth text as msg[n][lang], while lang is a language id.  I used ISO 639-1 language code for the id.

langList = "en=English;de=Deutsch;"
msg[1] = "en=Good Morning.;de=Guten Morgen.;"
msg[2] = "en=Good Afternoon.;de=Guten Tag.;"
msg[3] = "en=Good Evening.;de=Guten Abend.;"
While "True"
  error = "True"
  While error
    TextWindow.Write("Language: ")
    TextWindow.Write("1 (" + langList["en"] + ") or ")
    TextWindow.Write("2 (" + langList["de"] + ")? ")
    num = TextWindow.ReadNumber()
    If num = 1 Then
      lang = "en"
      error = "False"
    ElseIf num = 2 Then
      lang = "de"
      error = "False"

The second one BGF911-2 supports 20 languages.  I modified Jibba Jabba’s Drop Down Menu System for this program.

The last one is a game Small Quest (alpha version).  This game supports three languages and reads texts from files (*en-US.dat, *ja-JP.dat or *pt-BR.dat).

Let’s create international programs!

Comments (4)

  1. Wow. These are fantastic examples of localized programs! Very impressive!

  2. Jibba Jabba says:

    Nice job Nonki.. Great to see some collaborative work.

  3. PhilipRocker says:

    Verry nice  Nonki.

Skip to main content