Results 1 to 5 of 5

Thread: i18n help page

  1. #1

    i18n help page

    Hi,

    here : help/html/ci18n.htm , this example might be more coherent with the upper xml example :

    How to get values from parsed XML file
    Once file is loaded and parsed, all data inside XML file is stored into an hash table with key/data pairs.
    The key under which data is stored is composed by a concatenation of nodes and sibling nodes separated by \
    if MyI18N.ErrorPresent Then
    
      '---Some error occurred
    
      printl "Error code", MyI18N.ErrorCode
    
      printl "Error description", MyI18N.ErrorDescription
    
    Else
    
      '---No errors, we can go on
    
      printl MyI18N.GetKey("thinAir")
    
      printl MyI18N.GetKey("en-GB\HiThere")
    
      printl MyI18N.GetKey("it-IT\Good_Morning")
    
      printl MyI18N.GetKey("fr-FR\What_Is_Your_Name")
    
      printl StrFormat$(MyI18N.GetKey("en-GB\My_Name_Is"),"thinBasic")
    
      printl MyI18N.GetKey("thinBasic\en-GB")
    
    end if
    
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,793
    Rep Power
    10
    Thanks, will be present in next release
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #3

    I18N module

    Here : https://www.thinbasic.com/public/pro.../html/i18n.htm

    How to use this module
    Inside your script, before calling any module specific keyword, add the following:
    USES "I18N"
    This directive will load the module and add new keywords and classes described in this section.


    IMPORTANT

    When loaded, I18N module will automatically create a I18N variable of cI18N class allowing programmer to load XML files.
    So to use this module, just use the automatic variable I18N.
    I18N module will automatically create a I18N variable of cI18N class
    This seems not true: if you remove the Dim instruction in the I18N sample, you'll get an Unknown Keyword error.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  4. #4
    https://www.thinbasic.com/public/pro..._getlocale.htm
    https://www.thinbasic.com/public/pro..._setlocale.htm

    on these help pages,
    the syntax line and page title are not the good ones. (Sort of Copy/Paste oversight)
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  5. #5
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,129
    Rep Power
    732
    Thanks for reporting these issues, Sebastian!


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Similar Threads

  1. i18n internationalization functionality in thinbasic / thinair
    By DirectuX in forum Suggestions/Ideas discussions
    Replies: 23
    Last Post: 18-11-2018, 17:12
  2. What I'm working on ... page
    By ErosOlmi in forum thinBasic Beta testing
    Replies: 1
    Last Post: 18-10-2018, 07:35
  3. 3D web page lessons
    By Charles Pegge in forum Shout Box Area
    Replies: 13
    Last Post: 22-01-2012, 12:30
  4. Example: Section 5.4 (page 41), Combined with Exercise 1 (page 44)
    By kryton9 in forum ThinBASIC programming in OpenGL/TBGL
    Replies: 2
    Last Post: 26-02-2010, 20:46
  5. First page on BING
    By ErosOlmi in forum thinBasic where ...
    Replies: 8
    Last Post: 09-12-2009, 16:57

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •