Multilanguage Easy

Discussion in 'iOS Code Snippets' started by Humberto, May 22, 2017.

  1. Humberto

    Humberto Active Member Licensed User

    Simple translate rotines

    I develop a simple rotine to translate language using text file like "NotePad"

    The example translate from Português to English and português has special characaters

    To start
    - run in debug mode so you can set a button to call "trans.generate" after the first steps
    - Even if you don´t have any translate file you must inicialize "trans.initialize ( filename )"
    - Then every text you add the call before the text "trans.translate ( "some texto")
    - The software will run normally and will building the map to translate
    - run every message and panel from your app and clear the log and press the button "generate" to call "generate_txt" so in the log windows you can copy all and paste to a text file edit with "NotePad"
    ( I use the Notepad ++ )
    - this will be the default language file like "lang.pt"
    - We define "=" ( equal sign) as the separator but you can change to other character
    - copy the file to start translating to other language and change the right side after "=" in the file and a new name
    - The text files must be inside the to "File" directory

    Then try to run your software initializing wit the new language.
    You can run your app and if there is any ortion that was not included in the file when you press the button "generate" just the news one will appear and you can copy and psast to the text file to trabslate
     

    Attached Files:

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice