QuiQRun! Localization

QuiQRun! Skin Italia
Skinning QuiQRun!

Hi all,

I’m looking for people who can translate about 150 terms and some short sentences for my new app QuiQRun! If you can help me, send me a mail to alain.bailleul@pandora.be.

I already have English, Dutch, Italian, French, German, Spanish and Portuguese.

What can I offer?

1. The full version of QuiQRun!
2. A skin in QuiQRun! with your favorite colors
3. Full credit in the apps credits screen
4. Eternal gratitude!

How do I use it in B4A?
The translations are stored in a language file, eg. en-us.lng.

They are stored in a predefined format:

{0003};Setting new skin, one moment...
{0004};Tap to get more info!
{0005};This QRCode is expired!

In Basic4Android, It checks if it has a translation, if not it uses the default you put in the GetString function. Here is the snippet I use:

Sub Process_Globals
    Public LangStrings As Map
    Public BOM As Int = 65279 ' Byte Order Mark for Windows UTF-8 files
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Dim R As Reflector
    R.Target = R.RunStaticMethod("java.util.Locale", "getDefault", Null, Null)
    Dim tmpLang As String = R.RunMethod("getLanguage")
    Select Case tmpLang
        Case "nl"
        Case "fr"
        Case "it"
        Case "es"
        Case "de"
        Case Else
    End Select

    ' using it:
    ToastMessageShow(GetString("{0003}","Setting new skin, one moment..."), true)
End Sub

Public Sub LoadLanguageFile(setLanguageFile as String)
    If File.Exists(File.DirAssets, setLanguageFile) Then
        Dim txtR As TextReader
        txtR.Initialize(File.OpenInput(File.DirAssets, setLanguageFile))
        Dim line As String
        line = txtR.ReadLine
        Do While line  Null
            line = line.Replace(Chr(BOM), "")
            LangStrings.Put(line.SubString2(0,6), line.SubString(7))
            line = txtR.ReadLine
    End If   
End Sub

Public Sub GetString(iCode As String, iDefault As String) As String
    If LangStrings.ContainsKey(iCode) Then
        Return LangStrings.Get(iCode)
        Return iDefault
    End If
End Sub




6 thoughts on “QuiQRun! Localization

  1. Hey, there !
    I’m not interested in the App (iOS User) and I really don’t have that much time, but send it over and I’ll translate it for you as quick as I can. I’m always happy to help and seeking for some insight in how and what lines are commonly translated. I can only offer German though …

    A common output format (utf8 csv or tsv to be specific) for translators I learned due to one of my customers is:
    lang_key TAB original_line TAB translated_line (/ original_line as default)

    Makes it easier to translate and it can be quite easily converted back into your required format.

    And btw: I’ve recently worked with Laravel 4’s translation support which is based upon Symfony’s solution and seeing your code, I’d warmly suggest you implement that !
    It’s nicer to code as you have your keys with almost self-explanatory clear text and some other options like the choice() method, which really helps.

    Read about it here:

    And here:


    1. Hi Raphael!

      Thank you for your offer to translate QuiQRun! to German but I would prefer it to be translated by someone with some interest in the app. (iOS may follow later this year, depending on the success of the app and time available).

      I’ve worked for about 10 years in the translation business and I learned that software translation is something completely different. It’s better to have an accurate translation (where the translator can act on what he sees in the software) or no translation at all. Any ‘inbetween solution’ can easily backfire.

      There are indeed other (and better) solutions for the fileformat, but I’m to close to my release to make such changes now.

      But it is and interesting read on the laravel site! I’m definitely going to consider this (or write a Xojo/Android wrapper) in the future!



      1. Yes, of course. That I considered. Of course I would need to see a version in action so I can translate … but for that there is bluestacks.
        I just couldn’t use it on my phone due to iOS and sadly see all my iPhone QR-apps untouched for a while now.

        For that reason I wish you the best both success wise and translation wise.

        And yes.
        The Laravel / Symfony solution is quite nice, although it doesn’t cover it all. Say localized dates and number-formats. But for that there are enough core functions in PHP so it’s able to remain both simple and easy to use.

        I just find it very easy to just have to specify a string-key instead of integers and a fallback translation. And the whole thing, including the choice option, is really, really easy to copy (have done it myself for non-framework projects).

        Good luck !

  2. PS

    The tsv format is only for the translators, as it can easily be edited inside of excel, or open office, without requirement of clicking around in a usual text-editor or else. The way Laravel stores translations is simply a one-dimensional, even multi-dimensional array with keys and values.
    The php-array equivalent in Xojo would be a Dictionary as you may know …
    In understand your point though.
    Just throwing some ideas in there 😉

    1. And your input is much appreciated Raphael! In my android code I do a similar thing (a map is like a Xojo dictionary). I agree having a string key would be better. It’s just a way I do it for a long time and I probably should rethink it for the future.

      I must have misinterpreted your first sentence (‘I’m not interested in the App…’) and I apologize for that.

      If you are still willing to translate it to German (and I completely understand if you don’t), send a mail to alain.bailleul@pandora.be (This way your email is not exposed on this blog).

      I then try to reform my language file to something you can use (“DE” + TAB + Source + TAB + Translation would be ok?)



  3. Hi Alain!! I follow you since this blog was created. Congratulations for your work. You’re brilliant programmer!!
    I’m brasilian, so finally I can contribute to you translating your app.
    I use B4A and Xojo Too, and ours interests are similar.
    Please, make contact as you wish
    Regards. Alex

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s