other languages

Discussion in 'Questions (Windows Mobile)' started by gjoisa, Jun 28, 2008.

  1. gjoisa

    gjoisa Active Member Licensed User

    Hi everybody !
    I am trying a program in our local language . I am from India and every state has its own language . Almost all PCs support local languages now a days . Can it be done ? Then how ? I am intending the coding in english and the output shuld be in local language .:sign0085:
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Basic4ppc encodes strings with UTF8.
    All languages could be represented in this encoding.
     
  3. Cableguy

    Cableguy Expert Licensed User

    Using the info on THIS THREAD, you can retrieve the code page that is being used by the system, and have the "normal" text converted to that codepage with THIS DLL....
    Shouldn't be too hard...
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    That is usually not required.
    You can simply work in the language you like in the same way you work with English strings.
     
  5. agraham

    agraham Expert Licensed User

    I assume that you want the same program to be available with ther option of different languages. You need to know that Pocket PCs are Unicode based, even the OS while on the desktop .NET is also Unicode even if the underlying OS is not. What this means is that you don't have to do any character code conversion as the Unicode character set includes all languages.

    I would suggest that rather than keeping strings in the program they are read from a UTF8 format text file at runtime. You may need to extend this to the text in lables and on buttons etc.

    You need to get the Unicode strings in the correct language in the UTF8 files. This can be a problem as keyboards are set to a specific language so that even a Unicode aware program, like Notepad in XP and Vista, can only easily generate files in the language that the system is set to. You may need to generate each file on a PC or device set to the appropriate language.

    Naturally each device will need the system set to the required language to get the correct font for each language.
     
  6. klaus

    klaus Expert Licensed User

    I can confirm that this works.

    For the Expense Tracker program http://www.basic4ppc.com/forum/share-your-creations/1316-expense-tracker.html, alfcen translated the texts used in the program for Labels, Buttons etc. from English to Japanese. Unfortunately on my PPC with a French operating system I didn't see the Japanese texts on controls managed by the operating system, even after loading a Japanese font set, but with the Japanese operating system alfcen confirmed that it looks great. There is only one program, and as agraham wrote, the texts are read at runtime.
    http://www.basic4ppc.com/forum/questions-help-needed/1449-font-change.html

    In the screenshot in the first post you can see Japanese texts in the Labels and Checkboxes but not in the MessageBox.

    Best regards
     
  7. gjoisa

    gjoisa Active Member Licensed User

    Sorry for re entering the old thread . Actually I did not understand the language changing method and dropped the project at that time . Again trying now . Can any one describe the concept with a small example ? Thanks in advance .
     
  8. klaus

    klaus Expert Licensed User

    There is an example here: http://www.basic4ppc.com/forum/code-samples-tips/3701-some-modules.html

    In the 'Setup' module you can select the language you want, not all languages are already translated. There are 2 text files for each language, one for general texts, common to all programs, and one for texts specific to the program where the module is used.

    Best regards.
     
  9. gjoisa

    gjoisa Active Member Licensed User

    Nothing understood by me . I dont know Japanese or French . I am trying to get "Kannada" (an Indian language) charecters in my application . MSDN's code page identifier refers identifier as 57008 and .Net name as x-iscii-ka for this language. How to use this char sets in my application ?
     
  10. klaus

    klaus Expert Licensed User

    What language is your OS ?

    In the Setup module you can select a language, the texts of the different controls and the texts in the code are stored in different text files for the languages and read into the program in an array. The texts are updated in the UpdateLanguage routines.
    To create the text file, you should use a text editor with the right character set and probably the right keyboard.

    The Japanese file in the example in the Setup module was written by alfcen a user in Japan. It works fine with a Japanese OS.

    I had tried to get Japanese characters on my system for testing but without any success, the system messages still remain the original ones. The problem was discussed in this thread: http://www.basic4ppc.com/forum/questions-help-needed/1449-font-change.html

    Best regards.
     
    Last edited: Feb 14, 2009
  11. agraham

    agraham Expert Licensed User

    As we said before Basic4ppc can already handle most characters. For instance even on my UK desktop this code will display a Kannada string in a text box.

    Code:
    For i = 3218 To 3231
        msg = msg & 
    Chr(i)
     
    Next
    Textbox1.Text = msg
    3218 to 32331 are part of the set of Unicode code points allocated to Kannada characters Kannada - Test for Unicode support in Web browsers To display the characters you need an appropriate font on the system, which it seems my desktop has although my devices have not.

    You also need a source of the text that you want to display. It could be entered from a keyboard if the system keyboard settings support Kannada or it could come via a file genereated by some external means.
     
  12. gjoisa

    gjoisa Active Member Licensed User

    Thank you Agraham . Almost I got it . The web page which you mentioned helped me lot . It contains exact ascii numbers . And my computer also have the fonts called "Tunga" and "shruti" work fine . i have copied and pasted the font in my device 'Windows/fonts' folder working fine with my device also . Thanks for clear explanation .
     
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