Translate, again

Source code related resources

Moderator: Rathinagiri

Post Reply
User avatar
dragancesu
Posts: 542
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 11 times
Been thanked: 97 times

Translate, again

Post by dragancesu » Sat Oct 29, 2016 4:05 am

This forum is world's, I do not know from how many countries are members, but I see that coming new every day

Examples of the program are short and every single function, there are only a few applications. Is that enough for beginners do not know, but I think it needs a few more complete examples that include menus, forms and reports. I attached one (already seen).

An example is in English, but there are also following that has translated into my language, Serbian. Translation is in the folder lang and there are files with translation

The following program is nlsedit which serves to make the necessary. There are three steps,
analysis of the program - reads strings in programs,
changes - allows input translation, and
save finally translate

When there is a LINE shift and tell translation
LINE 0 is reserved for the name of the language, so it will be called files
LINE <0 is reserved for comments

The programs i18n.prg features that are necessary
nls_init - at the beginning of
nls_select - language selection
nls_lang - to display the translation

Finaly, strings you want to translate replace it with a translation nls_lang (n)

It looks like this

Code: Select all

         DEFINE POPUP nls_lang(4)  // date
            MENUITEM nls_lang(5)                          ACTION edit_cost() // costs
            MENUITEM nls_lang(6)                        ACTION edit_pay() // payment
            MENUITEM nls_lang(7)               ACTION md_cost() // costs and payment
            SEPARATOR 
            MENUITEM nls_lang(8)                           ACTION MainForm.Release // exit program
         END POPUP 
What I do need is a change of code page

For the next language is sufficient editor, so I'll ask the members of good will to do the translation for your language and leave it on the forum

Regards to all
demo1.zip
english version
(33.87 KiB) Downloaded 104 times
demo2.zip
with translate
(38.95 KiB) Downloaded 107 times
nls.zip
NLSeditor
(21.36 KiB) Downloaded 91 times

User avatar
serge_girard
Posts: 2045
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 404 times
Been thanked: 89 times
Contact:

Post by serge_girard » Sat Oct 29, 2016 7:19 am

Thanks Dragan,

I can make the dutch translation.

Serge

User avatar
tonton2
Posts: 247
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Has thanked: 4 times
Been thanked: 7 times
Contact:

Post by tonton2 » Sat Oct 29, 2016 2:07 pm

Bonsoir à toute l'equipe
Merci beaucoup pour cette initiative, mais je n'ai pas bien compris la procedure vu que mon anglais est très mediocre ;)
Hi
Thank you very much for this initiative, but I did not understand the procedure because my English is very mediocre :roll:
L'Algerie vous salut
Y.TABET

User avatar
dragancesu
Posts: 542
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 11 times
Been thanked: 97 times

Post by dragancesu » Sat Oct 29, 2016 11:18 pm

Thank you for interest

Attachment contains maunual (english version) how to make translate,
also tables, indexes, sample program and final program
Attachments
nls&manual.zip
(601.59 KiB) Downloaded 119 times

User avatar
tonton2
Posts: 247
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Has thanked: 4 times
Been thanked: 7 times
Contact:

Post by tonton2 » Sun Oct 30, 2016 11:33 am

merci mon ami
L'Algerie vous salut
Y.TABET

Post Reply