Page 1 of 1

How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 9:47 am
by ukoenig
Hello,

I want to modify the < sample01.prg > and translate it to german.
It is a nice calendar but I couldn't detect the text of month- and weekday-names
for translation inside the prg ( it seems to embedded somewhere )

maybe to be changed :?:
REQUEST HB_LANG_ES
REQUEST HB_CODEPAGE_ESWIN

Image

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 9:52 am
by Silvio.Falconi
Perhaps :

REQUEST HB_LANG_DE

and on source

HB_LangSelect("DE")
HB_SetCodePage("DEWIN")

see here https://harbour.github.io/doc/harbour.h ... langselect


on your image I see the calendar on Germany language, Calex on spagnol language and some text on Italian language and some string in english language
Perhaps there is some problems... :)

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 9:58 am
by Silvio.Falconi
Uwe,
How create the image with the effect of paper cutted?

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 10:05 am
by ukoenig
Silvio,

Yes that works monthnames and daynames are translated.
( your question : the image-border can be selected from inside the screenshot-software )

but there is a problem with one month :

Januar-Februar
März
April-Mai-Juni-Juli
August-September-Oktober
November-Dezember

Code: Select all

days are translated
REQUEST DBFCDX
REQUEST HB_LANG_DE
REQUEST HB_CODEPAGE_ESWIN

Static nPop   := 0
Static oItems
Static aChecks

//----------------------------------------------------------------------------//

function Main()

   local oBrush
   local oMenu
   local oWnd

   oItems   := Array( 6 )
   aChecks  := { .F., .F., .F., .F., .F., .F. }

   HB_CDPSELECT("DEWIN")
   HB_LangSelect( "DE" )
 
Image

regards
Uwe :(

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 11:28 am
by Silvio.Falconi
REQUEST DBFCDX
REQUEST HB_LANG_DE
REQUEST HB_CODEPAGE_ESWIN <------------------error Dewin

I not remember but the string are with fwstring function ?

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 11:45 am
by ukoenig
Silvio,

it seems the problem belongs only to

REQUEST HB_LANG_DE

REQUEST HB_CODEPAGE_DEWIN
doesn't have any effect.

maybe something else must be added

regards
Uwe :(

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 12:11 pm
by Silvio.Falconi
strange
here run ok

Image

Image

Image


Image

Code: Select all


REQUEST HB_LANG_IT
REQUEST DBFCDX
REQUEST DBFFPT

EXTERNAL  ordkeyno, ordkeycount,ordcreate,ordkeygoto

FUNCTION Main()

   PUBLIC oApp

   RddSetDefault( "DBFCDX" )


    HB_LangSelect("IT")



   SetHandleCount( 100 )

   SET DATE FORMAT "dd-mm-yyyy"
   SET DELETED     ON
   SET CENTURY     ON
   SET EPOCH TO    year( date() ) - 20
   SET MULTIPLE    OFF


 

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 12:16 pm
by Silvio.Falconi
Now I made a test on Germany and there are errors with Germany lang !!!

Image

Image

Image

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 12:22 pm
by ukoenig
Silvio,

the program is ok and works fine
it is only the german translation of the month < März >
because it is defined in < HB_LANG_DE >
day names are ok no ä ö ü are included.

regards
Uwe

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 12:30 pm
by Silvio.Falconi
I'm thinking there is a command to set these letter of alphabet....
Perhaps Otto Know wich is the command

Cristobal ?
Nages ?
Antonio?

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 2:32 pm
by byte-one
Uwe, probiere dies:

Code: Select all

    REQUEST HB_CODEPAGE_DEWIN   //// Sortierung in Harbour
    HB_SETCODEPAGE("DEWIN")
    #ifdef AUSTRIA
        REQUEST HB_LANG_DE_AT
        HB_LANGSELECT("de_at")
    #else
        REQUEST HB_LANG_DEWIN
        HB_LANGSELECT("DEWIN")
    #endif
 

Re: How to translate some parts of sample01 ( spanish ) ?

Posted: Fri Mar 08, 2019 2:52 pm
by ukoenig
Günther,

Thank You very much,
tested and works fine

it is a nice tool and I will add some improvements and extensions.
There will be a language-file and color-adjustment.

Image

the changes on top of the prog.
:

Code: Select all

REQUEST DBFCDX
REQUEST HB_CODEPAGE_DEWIN   //// Sorting in Harbour

Static nPop   := 0
Static oItems
Static aChecks

//--------------------------------- 

FUNCTION MAIN()
local oBrush
local oMenu
local oWnd

oItems   := Array( 6 )
aChecks  := { .F., .F., .F., .F., .F., .F. }

HB_SETCODEPAGE("DEWIN")
#ifdef AUSTRIA
        REQUEST HB_LANG_DE_AT
        HB_LANGSELECT("de_at")
#else
        REQUEST HB_LANG_DEWIN
        HB_LANGSELECT("DEWIN")
#endif

HB_CDPSELECT("DEWIN")
 
regards
Uwe :D