Introducing the new FW Strings API

Introducing the new FW Strings API

Postby Antonio Linares » Sun Aug 04, 2013 8:07 pm

we are working to completely remove the prev...DLLs required for Print Preview :-)

So we have implement a FiveWin Strings API, that you can also use in your own apps to support multiple languages!

The Strings API functions are:

1. FWSetLanguage( nNewLanguage ) // sets the language to use at rumtime

2. FWString( "my string" ) // searches for "my string" translation and returns it

3. FWMissingStrings() // generates the source code for the missing strings to translate

By default 1 is used (English). If you want to use Spanish then do: FWSetLanguage( 2 ). We need help for French, Deutch, etc.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41439
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Introducing the new FW Strings API

Postby Antonio Linares » Sun Aug 04, 2013 8:08 pm

Here you have the API in case that you want to test it or if you want to propose some enhancements, changes, etc. thanks! :-)

strings.prg
Code: Select all  Expand view
// FWH strings multiple languages support

#include "FiveWin.ch"

static nLanguage := 1 // 1 English
                      // 2 Spanish
                      // 3 French ?
                      // 4 ???

static aStrings := { { "Attention", "Atención" },;
       { "PDF Plugin Error", "Error del plugin de PDF" },;
       { "PDF not saved to send Email", "No se ha guardado el PDF a enviar por email" },;
       { "MS Word not installed", "MS Word no está instalado" },;
       { "Failed to Create Word Document", "No se ha podido crear el documento de Word" },;
       { "There is no output for export", "No hay nada que exportar" },;
       { "No .Doc file manipulation software installed", "No hay instalado software para usar ficheros .Doc" },;
       { "not found, imposible to continue", "no se ha encontrado, no se puede continuar" },;
       { "Printing Error", , "Error de impresión" },;
       { "View", "¿ Visualizar" },;
       { "Excel not installed", "Excel no está instalado" },;
       { "Report width is greater than page width", "El ancho del reporte es mayor que el ancho de la página" },;
       { "Export to Excel is available only", "Solo está disponible exportar a Excel" },;
       { "for Reports with ::bInit defined", "para reportes con ::bInit definido" },;
       { "Printing Preview", "Previsualización de Impresión" },;
       { "&File", "&Fichero" },;
       { "&Print", "&Imprimir" },;
       { "Print actual page", "Imprimir la página actual" },;
       { "&Exit", "&Salir" },;
       { "Exit from preview", "Salir de la previsualización" },;
       { "Page", "Página" },;
       { "&First", "&Primera" },;
       { "Go to first page", "Ir a la primera página" },;
       { "&Previous", "&Anterior" },;
       { "Go to previous page", "Ir a la página anterior" },;
       { "&Next", "&Siguiente" },;
       { "Go to next page", "Ir a la siguiente página" },;
       { "&Last", "&Ultima" },;
       { "Go to last page", "Ir a la última página" },;
       { "&Zoom", "&Zoom" },;
       { "Page zoom", "zoom de página" },;
       { "&Normal", "&Normal" },;
       { "Page unzoom", "Página normal" },;
       { "&Factor", "&Factor" },;
       { "Zoom factor", "Factor de zoom" },;
       { "Factor", "Factor" },;
       { "&Two pages", "&Dos páginas" },;
       { "Preview on two pages", "Previsualización en dos páginas" },;
       { "One &page", "Una &página" },;
       { "Preview on one page", "Previsualización en una página" },;
       { "Page number:", "Número de página:" },;
       { "Go to first page", "Ir a la primera página" },;
       { "First", "Primera" },;
       { "&Page", "&Página" },;
       { "Preview on one page", "Previsualización en una página" },;
       { "Previous", "Anterior" },;
       { "Next", "Siguiente" },;
       { "Last", "Ultima" },;
       { "Zoom", "Aumentar" },;
       { "Two pages", "Dos páginas" },;
       { "Print", "Imprimir" },;
       { "Save to DOC/PDF", "Guardar como DOC/PDF" },;
       { "DOC Format", "Formato DOC" },;
       { "PDF Format", "Formato PDF" },;
       { "Export to PDF", "Exportar a PDF" },;
       { "Send by email as PDF", "Enviar por email como PDF" },;
       { "Export to MS Word", "Exportar a MS Word" },;  
       { "Export to Excel", "Exportar a Excel" },;
       { "Exit", "Salir" },;
       { "Preview", "Previsualización" } }

static aMissing := {}      

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

function FWString( cString )

   local nAt

   If ( nAt := AScan( aStrings, { | aString | aString[ 1 ] == cString } ) ) != 0
      return aStrings[ nAt ][ nLanguage ]
   else
      MsgInfo( 'The string: "' + cString + '"' + CRLF + ;
               "defined from: " + ProcName( 1 ) + " line " + ;
               AllTrim( Str( ProcLine( 1 ) ) ) + " in " + ProcFile( 1 ) + CRLF + ;
               "is not defined in FWH strings" + CRLF + ;
               "Please add it to FWH\source\function\strings.prg" )
      AAdd( aMissing, cString )          
   endif

return cString

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

function FWSetLanguage( nNewLanguage )

   local nOldLanguage := nLanguage

   nLanguage = nNewLanguage

return nOldLanguage

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

function FWMissingStrings()

   local cResult := ""
   
   AEval( aMissing, { | cString | cResult += Space( 7 ) + '{ "' + cString + ;
                                  '", "" },;' + CRLF } )
   if ! Empty( cResult )
      MemoEdit( cResult, "Copy and paste in FWH\source\function\strings.prg" )
   endif
   
return cResult

//----------------------------------------------------------------------------//  
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41439
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Introducing the new FW Strings API

Postby nageswaragunupudi » Mon Aug 05, 2013 4:35 am

1. FWSetLanguage( nNewLanguage ) // sets the language to use at rumtime

Can this not default to the appropriate language depending on the codepage?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10316
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Introducing the new FW Strings API

Postby Richard Chidiak » Mon Aug 05, 2013 4:40 am

Antonio

Great

Here is the french translations

If we can adapt the same principle in other places like Mget.prg for example, i translate the messages at every release....

Best regards

Richard

Code: Select all  Expand view

static aStrings := { { "Attention", "Atención","Attention" },;
       { "PDF Plugin Error", "Error del plugin de PDF", "Erreur de plugin du PDF" },;
       { "PDF not saved to send Email", "No se ha guardado el PDF a enviar por email","PDF pas enregistré pour envoi Email" },;
       { "MS Word not installed", "MS Word no está instalado","MS Word pas installé" },;
       { "Failed to Create Word Document", "No se ha podido crear el documento de Word","Echec à la création du document Word" },;
       { "There is no output for export", "No hay nada que exportar","Rien à exporter" },;
       { "No .Doc file manipulation software installed", "No hay instalado software para usar ficheros .Doc","Pas de programme installé pour manipuler les fichiers .Doc" },;
       { "not found, impossible to continue", "no se ha encontrado, no se puede continuar","Pas trouvé, impossible de continuer" },;
       { "Printing Error", "Error de impresión","Erreur Impression" },;
       { "View", "¿ Visualizar","Visualiser" },;
       { "Excel not installed", "Excel no está instalado","Excel non installé" },;
       { "Report width is greater than page width", "El ancho del reporte es mayor que el ancho de la página","Largeur du Rapport supérieure à la largeur de la page" },;
       { "Export to Excel is available only", "Solo está disponible exportar a Excel","Export vers Excel uniquement disponible" },;
       { "for Reports with ::bInit defined", "para reportes con ::bInit definido","pour Rapports avec ::bInit défini" },;
       { "Printing Preview", "Previsualización de Impresión","visualisation de l'impression" },;
       { "&File", "&Fichero","&Fichier" },;
       { "&Print", "&Imprimir","&Imprimer" },;
       { "Print actual page", "Imprimir la página actual","Imprimer Page en Cours" },;
       { "&Exit", "&Salir","&Quitter" },;
       { "Exit from preview", "Salir de la previsualización","Quitter la Visualisation" },;
       { "Page", "Página","Page" },;
       { "&First", "&Primera","&Première" },;
       { "Go to first page", "Ir a la primera página","Aller à la première page" },;
       { "&Previous", "&Anterior","&Précédente" },;
       { "Go to previous page", "Ir a la página anterior","Aller à la page précédente" },;
       { "&Next", "&Siguiente","&Suivante" },;
       { "Go to next page", "Ir a la siguiente página","Aller à la page suivante" },;
       { "&Last", "&Ultima","&Dernière" },;
       { "Go to last page", "Ir a la última página","Aller à la dernière page" },;
       { "&Zoom", "&Zoom","&Zoom" },;
       { "Page zoom", "zoom de página","zoom de la page" },;
       { "&Normal", "&Normal","&Normal" },;
       { "Page unzoom", "Página normal","Page normale" },;
       { "&Factor", "&Factor","&Facteur" },;
       { "Zoom factor", "Factor de zoom","Facteur de Zoom" },;
       { "Factor", "Factor","Facteur" },;
       { "&Two pages", "&Dos páginas","&Deux pages" },;
       { "Preview on two pages", "Previsualización en dos páginas","Visualiser sur deux pages" },;
       { "One &page", "Una &página","une &page" },;
       { "Preview on one page", "Previsualización en una página","Visualiser sur une page" },;
       { "Page number:", "Número de página:","Numéro de la Page:" },;
       { "Go to first page", "Ir a la primera página","Aller à la première page"  },;
       { "First", "Primera","Première" },;
       { "&Page", "&Página","&Page" },;
       { "Preview on one page", "Previsualización en una página","Visualiser sur une page"  },;
       { "Previous", "Anterior","Précédent" },;
       { "Next", "Siguiente","Suivant" },;
       { "Last", "Ultima","Dernière" },;
       { "Zoom", "Aumentar","Zoom" },;
       { "Two pages", "Dos páginas","Deux pages" },;
       { "Print", "Imprimir","Imprimer" },;
       { "Save to DOC/PDF", "Guardar como DOC/PDF","Enregistrer Format DOC/PDF" },;
       { "DOC Format", "Formato DOC","Format DOC" },;
       { "PDF Format", "Formato PDF","Format PDF" },;
       { "Export to PDF", "Exportar a PDF","Exporter en PDF" },;
       { "Send by email as PDF", "Enviar por email como PDF","Evnoi par email format PDF" },;
       { "Export to MS Word", "Exportar a MS Word","Exporter vers MS Word" },;
       { "Export to Excel", "Exportar a Excel","Exporter vers Excel" },;
       { "Exit", "Salir","Quitter" },;
       { "Preview", "Previsualización","Visualisation" } }

 
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Introducing the new FW Strings API

Postby richard-service » Mon Aug 05, 2013 6:33 am

Antonio,
May I set nLanguage 4 = Traditional Chinese?
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 773
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: Introducing the new FW Strings API

Postby mgsoft » Mon Aug 05, 2013 8:51 am

Very good.

Please, can you also include RichEdit and MsgGet?.

Also, as Mr. Rao said, HB_LangSelect() retrives the language, so maybe you can place the language definition at TControl:New()?.

+++1
Saludos,

Eduardo
User avatar
mgsoft
 
Posts: 422
Joined: Mon Aug 17, 2009 12:18 pm
Location: España

Re: Introducing the new FW Strings API

Postby StefanHaupt » Mon Aug 05, 2013 9:39 am

here is the german translation

Code: Select all  Expand view
static aStrings := { { "Attention", "Atención","Attention", "Achtung" },;
       { "PDF Plugin Error", "Error del plugin de PDF", "Erreur de plugin du PDF", "PDF Plugin Fehler" },;
       { "PDF not saved to send Email", "No se ha guardado el PDF a enviar por email","PDF pas enregistré pour envoi Email", "PDF kann nicht versand werden" },;
       { "MS Word not installed", "MS Word no está instalado","MS Word pas installé", "MS Word nicht installiert" },;
       { "Failed to Create Word Document", "No se ha podido crear el documento de Word","Echec à la création du document Word", "Word Dokument kann nicht erstellt werden" },;
       { "There is no output for export", "No hay nada que exportar","Rien à exporter", "Export nicht möglich" },;
       { "No .Doc file manipulation software installed", "No hay instalado software para usar ficheros .Doc","Pas de programme installé pour manipuler les fichiers .Doc", "Keine Software zur Änderung von DOC Dateien gefunden" },;
       { "not found, impossible to continue", "no se ha encontrado, no se puede continuar","Pas trouvé, impossible de continuer", "nicht gefunden, Fortsetzung ncht möglich" },;
       { "Printing Error", "Error de impresión","Erreur Impression", "Druckfehler" },;
       { "View", "¿ Visualizar","Visualiser", "Ansicht" },;
       { "Excel not installed", "Excel no está instalado","Excel non installé", "Excel nicht installiert" },;
       { "Report width is greater than page width", "El ancho del reporte es mayor que el ancho de la página","Largeur du Rapport supérieure à la largeur de la page", "Reportbreite größer als Seitenbreite" },;
       { "Export to Excel is available only", "Solo está disponible exportar a Excel","Export vers Excel uniquement disponible", "Nur Export nach Excel möglich" },;
       { "for Reports with ::bInit defined", "para reportes con ::bInit definido","pour Rapports avec ::bInit défini", "für Report mit ::bInit Codeblock" },;
       { "Printing Preview", "Previsualización de Impresión","visualisation de l'impression", "Druckvorschau" },;
       { "&File", "&Fichero","&Fichier", "Datei" },;
       { "&Print", "&Imprimir","&Imprimer", "Drucken" },;
       { "Print actual page", "Imprimir la página actual","Imprimer Page en Cours", "aktuelle Seite drucken" },;
       { "&Exit", "&Salir","&Quitter", "Beenden" },;
       { "Exit from preview", "Salir de la previsualización","Quitter la Visualisation", "Vorschau beenden" },;
       { "Page", "Página","Page", "Seite" },;
       { "&First", "&Primera","&Première", "Erste Seite" },;
       { "Go to first page", "Ir a la primera página","Aller à la première page", "zur ersten Seite" },;
       { "&Previous", "&Anterior","&Précédente", "vorige Seite" },;
       { "Go to previous page", "Ir a la página anterior","Aller à la page précédente", "eine Seite zurück" },;
       { "&Next", "&Siguiente","&Suivante", "nächste Seite" },;
       { "Go to next page", "Ir a la siguiente página","Aller à la page suivante", "zur nächsten Seite" },;
       { "&Last", "&Ultima","&Dernière", "Letzte Seite" },;
       { "Go to last page", "Ir a la última página","Aller à la dernière page", "zur letzten Seite" },;
       { "&Zoom", "&Zoom","&Zoom", "Vergrößern" },;
       { "Page zoom", "zoom de página","zoom de la page", "Vergrößern" },;
       { "&Normal", "&Normal","&Normal", "Normal" },;
       { "Page unzoom", "Página normal","Page normale", "Verkleinern" },;
       { "&Factor", "&Factor","&Facteur", "Faktor" },;
       { "Zoom factor", "Factor de zoom","Facteur de Zoom", "Zoomfaktor" },;
       { "Factor", "Factor","Facteur", "Faktor" },;
       { "&Two pages", "&Dos páginas","&Deux pages", "Zwei Seiten" },;
       { "Preview on two pages", "Previsualización en dos páginas","Visualiser sur deux pages", "Vorschau auf 2 Seiten" },;
       { "One &page", "Una &página","une &page", "Eine Seite" },;
       { "Preview on one page", "Previsualización en una página","Visualiser sur une page", "Vorschau auf einer Seite" },;
       { "Page number:", "Número de página:","Numéro de la Page:", "Seitennummer" },;
       { "Go to first page", "Ir a la primera página","Aller à la première page", "Zur ersten Seite"  },;
       { "First", "Primera","Première", "Erste" },;
       { "&Page", "&Página","&Page", "Seite" },;
       { "Preview on one page", "Previsualización en una página","Visualiser sur une page", "Vorschau auf einer Seite"   },;
       { "Previous", "Anterior","Précédent", "Vorige Seite" },;
       { "Next", "Siguiente","Suivant", "Nächste Seite" },;
       { "Last", "Ultima","Dernière", "Letzte Seite" },;
       { "Zoom", "Aumentar","Zoom", "Vergrößern" },;
       { "Two pages", "Dos páginas","Deux pages", "Zwei Seiten" },;
       { "Print", "Imprimir","Imprimer", "Drucken" },;
       { "Save to DOC/PDF", "Guardar como DOC/PDF","Enregistrer Format DOC/PDF", "Export nach DOC/PDF" },;
       { "DOC Format", "Formato DOC","Format DOC", "DOC Format" },;
       { "PDF Format", "Formato PDF","Format PDF", "PDF Format" },;
       { "Export to PDF", "Exportar a PDF","Exporter en PDF", "Export nach PDF" },;
       { "Send by email as PDF", "Enviar por email como PDF","Evnoi par email format PDF", "Per Email senden (PDF)" },;
       { "Export to MS Word", "Exportar a MS Word","Exporter vers MS Word", "Export nach Word" },;
       { "Export to Excel", "Exportar a Excel","Exporter vers Excel", "Export nach Excel" },;
       { "Exit", "Salir","Quitter", "Beenden " },;
       { "Preview", "Previsualización","Visualisation", "Vorschau" } }
 
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Introducing the new FW Strings API

Postby Antonio Linares » Mon Aug 05, 2013 9:51 am

Thanks to all of you :-)

Here it is the most recent version. I appreciate if you manage to include in it your translations, thanks! :-)

strings.prg
Code: Select all  Expand view
// FWH strings multiple languages support

#include "FiveWin.ch"

static nLanguage := 1 // 1 English
                      // 2 Spanish
                      // 3 French ?
                      // 4 ???

static aStrings := { { "Attention", "Atención" },;
       { "PDF Plugin Error", "Error del plugin de PDF" },;
       { "PDF not saved to send Email", "No se ha guardado el PDF a enviar por email" },;
       { "MS Word not installed", "MS Word no está instalado" },;
       { "Failed to Create Word Document", "No se ha podido crear el documento de Word" },;
       { "There is no output for export", "No hay nada que exportar" },;
       { "No .Doc file manipulation software installed", "No hay instalado software para usar ficheros .Doc" },;
       { "not found, imposible to continue", "no se ha encontrado, no se puede continuar" },;
       { "Printing Error", , "Error de impresión" },;
       { "View", "¿ Visualizar" },;
       { "Excel not installed", "Excel no está instalado" },;
       { "Report width is greater than page width", "El ancho del reporte es mayor que el ancho de la página" },;
       { "Export to Excel is available only", "Solo está disponible exportar a Excel" },;
       { "for Reports with ::bInit defined", "para reportes con ::bInit definido" },;
       { "Printing Preview", "Previsualización de Impresión" },;
       { "&File", "&Fichero" },;
       { "&Print", "&Imprimir" },;
       { "Print actual page", "Imprimir la página actual" },;
       { "&Exit", "&Salir" },;
       { "Exit from preview", "Salir de la previsualización" },;
       { "Page", "Página" },;
       { "&First", "&Primera" },;
       { "Go to first page", "Ir a la primera página" },;
       { "&Previous", "&Anterior" },;
       { "Go to previous page", "Ir a la página anterior" },;
       { "&Next", "&Siguiente" },;
       { "Go to next page", "Ir a la siguiente página" },;
       { "&Last", "&Ultima" },;
       { "Go to last page", "Ir a la última página" },;
       { "&Zoom", "&Zoom" },;
       { "Page zoom", "zoom de página" },;
       { "&Normal", "&Normal" },;
       { "Page unzoom", "Página normal" },;
       { "&Factor", "&Factor" },;
       { "Zoom factor", "Factor de zoom" },;
       { "Factor", "Factor" },;
       { "&Two pages", "&Dos páginas" },;
       { "Preview on two pages", "Previsualización en dos páginas" },;
       { "One &page", "Una &página" },;
       { "Preview on one page", "Previsualización en una página" },;
       { "Page number:", "Número de página:" },;
       { "Go to first page", "Ir a la primera página" },;
       { "First", "Primera" },;
       { "&Page", "&Página" },;
       { "Preview on one page", "Previsualización en una página" },;
       { "Previous", "Anterior" },;
       { "Next", "Siguiente" },;
       { "Last", "Ultima" },;
       { "Zoom", "Aumentar" },;
       { "Two pages", "Dos páginas" },;
       { "Print", "Imprimir" },;
       { "Save to DOC/PDF", "Guardar como DOC/PDF" },;
       { "DOC Format", "Formato DOC" },;
       { "PDF Format", "Formato PDF" },;
       { "Export to PDF", "Exportar a PDF" },;
       { "Send by email as PDF", "Enviar por email como PDF" },;
       { "Export to MS Word", "Exportar a MS Word" },;  
       { "Export to Excel", "Exportar a Excel" },;
       { "Exit", "Salir" },;
       { "Preview", "Previsualización" },;
       { "Save as", "Guardar como" },;
       { "Printing", "Imprimiendo" },;
       { "&Ok", "&Aceptar" },;
       { "&Cancel", "&Cancelar" },;
       { "Printing range", "Rango de impresión" },;
       { "All", "Todo" },;
       { "Current page", "Página actual" },;
       { "Pages", "Páginas" },;
       { "From", "Desde" },;
       { "To", "Hasta" } }

static aMissing := {}      

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

function FWString( cString )

   local nAt

   If ( nAt := AScan( aStrings, { | aString | aString[ 1 ] == cString } ) ) != 0
      return aStrings[ nAt ][ nLanguage ]
   else
      MsgInfo( 'The string: "' + cString + '"' + CRLF + ;
               "defined from: " + ProcName( 1 ) + " line " + ;
               AllTrim( Str( ProcLine( 1 ) ) ) + " in " + ProcFile( 1 ) + CRLF + ;
               "is not defined in FWH strings" + CRLF + ;
               "Please add it to FWH\source\function\strings.prg" )
      AAdd( aMissing, cString )          
   endif

return cString

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

function FWSetLanguage( nNewLanguage )

   local nOldLanguage := nLanguage

   nLanguage = nNewLanguage

return nOldLanguage

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

function FWMissingStrings()

   local cResult := ""
   
   AEval( aMissing, { | cString | cResult += Space( 7 ) + '{ "' + cString + ;
                                  '", "" },;' + CRLF } )
   if ! Empty( cResult )
      MemoEdit( cResult, "Copy and paste in FWH\source\function\strings.prg" )
   endif
   
return cResult

//----------------------------------------------------------------------------//  
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41439
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Introducing the new FW Strings API

Postby Antonio Linares » Mon Aug 05, 2013 10:00 am

Also you can easily use this API to make your apps multilanguage :-)

As easy as doing:

function MyAppLiterals()

FWAddString( { "Hello", "Hola", "Alo", ... } )
FWAddString( { "Bye", "Adios", "Au revoir", ... } )
...

return nil

Then from your app simply use: FWString( "Hello" )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41439
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Introducing the new FW Strings API

Postby Richard Chidiak » Mon Aug 05, 2013 11:09 am

Antonio

Here is the french translation with the missing strings

Richard

PS will you be using this technique wherever possible in fwh ?

Code: Select all  Expand view

static aStrings := { { "Attention", "Atención","Attention" },;
       { "PDF Plugin Error", "Error del plugin de PDF", "Erreur de plugin du PDF" },;
       { "PDF not saved to send Email", "No se ha guardado el PDF a enviar por email","PDF Non enregistré pour envoi Email" },;
       { "MS Word not installed", "MS Word no está instalado","MS Word non installé" },;
       { "Failed to Create Word Document", "No se ha podido crear el documento de Word","Echec à la création du document Word"  },;
       { "There is no output for export", "No hay nada que exportar","Rien à exporter" },;
       { "No .Doc file manipulation software installed", "No hay instalado software para usar ficheros .Doc","Pas de programme installé pour manipuler les fichiers .Doc" },;
       { "not found, imposible to continue", "no se ha encontrado, no se puede continuar","Pas trouvé, impossible de continuer" },;
       { "Printing Error", , "Error de impresión","Erreur Impression" },;
       { "View", "¿ Visualizar","Visualiser" },;
       { "Excel not installed", "Excel no está instalado","Excel non installé" },;
       { "Report width is greater than page width", "El ancho del reporte es mayor que el ancho de la página","Largeur du Rapport supérieure à la largeur de la page" },;
       { "Export to Excel is available only", "Solo está disponible exportar a Excel","Export vers Excel uniquement disponible" },;
       { "for Reports with ::bInit defined", "para reportes con ::bInit definido","pour Rapports avec ::bInit défini"  },;
       { "Printing Preview", "Previsualización de Impresión","visualisation de l'impression"  },;
       { "&File", "&Fichero","&Fichier" },;
       { "&Print", "&Imprimir","&Imprimer" },;
       { "Print actual page", "Imprimir la página actual","Imprimer la Page en Cours" },;
       { "&Exit", "&Salir","&Quitter" },;
       { "Exit from preview", "Salir de la previsualización","Quitter la Visualisation" },;
       { "Page", "Página","Page" },;
       { "&First", "&Primera","&Première" },;
       { "Go to first page", "Ir a la primera página","Aller à la première page" },;
       { "&Previous", "&Anterior","&Précédente" },;
       { "Go to previous page", "Ir a la página anterior","Aller à la page précédente" },;
       { "&Next", "&Siguiente","&Suivante" },;
       { "Go to next page", "Ir a la siguiente página","Aller à la page suivante" },;
       { "&Last", "&Ultima","&Dernière" },;
       { "Go to last page", "Ir a la última página","Aller à la dernière page" },;
       { "&Zoom", "&Zoom","&Zoom" },;
       { "Page zoom", "zoom de página","zoom de la page" },;
       { "&Normal", "&Normal","&Normal" },;
       { "Page unzoom", "Página normal","Page normale" },;
       { "&Factor", "&Factor","&Facteur" },;
       { "Zoom factor", "Factor de zoom","Facteur de Zoom" },;
       { "Factor", "Factor","Facteur" },;
       { "&Two pages", "&Dos páginas","&Deux pages" },;
       { "Preview on two pages", "Previsualización en dos páginas","Visualiser sur deux pages" },;
       { "One &page", "Una &página","une &page" },;
       { "Preview on one page", "Previsualización en una página","Visualiser sur une page" },;
       { "Page number:", "Número de página:","Numéro de la Page:" },;
       { "Go to first page", "Ir a la primera página","Aller à la première page"  },;
       { "First", "Primera","Première" },;
       { "&Page", "&Página","&Page" },;
       { "Preview on one page", "Previsualización en una página","Visualiser sur une page"  },;
       { "Previous", "Anterior","Précédent" },;
       { "Next", "Siguiente","Suivant" },;
       { "Last", "Ultima","Dernière" },;
       { "Zoom", "Aumentar","Zoom" },;
       { "Two pages", "Dos páginas","Deux pages" },;
       { "Print", "Imprimir","Imprimer" },;
       { "Save to DOC/PDF", "Guardar como DOC/PDF","Enregistrer Format DOC/PDF" },;
       { "DOC Format", "Formato DOC","Format DOC" },;
       { "PDF Format", "Formato PDF","Format PDF" },;
       { "Export to PDF", "Exportar a PDF","Exporter en PDF" },;
       { "Send by email as PDF", "Enviar por email como PDF","Evnoi par email format PDF" },;
       { "Export to MS Word", "Exportar a MS Word","Exporter vers MS Word" },;
       { "Export to Excel", "Exportar a Excel","Exporter vers Excel" },;
       { "Exit", "Salir","Quitter" },;
       { "Preview", "Previsualización","Visualisation" },;
       { "Save as", "Guardar como","Enregistrer Sous" },;
       { "Printing", "Imprimiendo","Impression" },;
       { "&Ok", "&Aceptar","&OK" },;
       { "&Cancel", "&Cancelar","&Annuler" },;
       { "Printing range", "Rango de impresión","Portée Impression" },;
       { "All", "Todo","Toutes" },;
       { "Current page", "Página actual","Page en cours" },;
       { "Pages", "Páginas","Pages" },;
       { "From", "Desde","De" },;
       { "To", "Hasta","A" } }

 
Last edited by Richard Chidiak on Tue Aug 06, 2013 3:40 am, edited 1 time in total.
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Introducing the new FW Strings API

Postby elvira » Mon Aug 05, 2013 12:28 pm

Antonio,

Can you please translate richedit, memo editing (popup menu is only in English) and mssget?.

Many thanks :D :D :D
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: Introducing the new FW Strings API

Postby ADutheil » Mon Aug 05, 2013 9:15 pm

Portuguese translation with french accent. Native portuguese speakers please correct me.

Code: Select all  Expand view
static aStrings := { { "Attention", "Atención", "Atenção" },;
       { "PDF Plugin Error", "Error del plugin de PDF", "Erro do plugin do PDF"  },;
       { "PDF not saved to send Email", "No se ha guardado el PDF a enviar por email", "O PDF não foi salvo para mandar por email"  },;
       { "MS Word not installed", "MS Word no está instalado", "MS Word não está instalado" },;
       { "Failed to Create Word Document", "No se ha podido crear el documento de Word", "Não foi possível criar o documento do Word" },;
       { "There is no output for export", "No hay nada que exportar", "Nada para exportar" },;
       { "No .Doc file manipulation software installed", "No hay instalado software para usar ficheros .Doc", "Não tem software instalado  para usar arquivos .Doc" },;
       { "not found, imposible to continue", "no se ha encontrado, no se puede continuar", "não encontrado, impossível continuar" },;
       { "Printing Error", "Error de impresión", "Erro de impressão" },;
       { "View", "¿ Visualizar", "Visualizar" },;
       { "Excel not installed", "Excel no está instalado", "Excel não está instalado" },;
       { "Report width is greater than page width", "El ancho del reporte es mayor que el ancho de la página", "A largura do relátorio é maior que a página" },;
       { "Export to Excel is available only", "Solo está disponible exportar a Excel", "Somente a exportãção para o Excel está disponível" },;
       { "for Reports with ::bInit defined", "para reportes con ::bInit definido", "para relatórios com ::bInit definido" },;
       { "Printing Preview", "Previsualización de Impresión", "Previsualização da impressão" },;
       { "&File", "&Fichero", "Ar&quivos" },;
       { "&Print", "&Imprimir", "&Imprimir" },;
       { "Print actual page", "Imprimir la página actual", "Imprimir a página atual" },;
       { "&Exit", "&Salir", "&Sair" },;
       { "Exit from preview", "Salir de la previsualización", "Sair da previsualização" },;
       { "Page", "Página", "Página" },;
       { "&First", "&Primera", "&Primeira" },;
       { "Go to first page", "Ir a la primera página", "Ir para primeira página" },;
       { "&Previous", "&Anterior", "&Anterior" },;
       { "Go to previous page", "Ir a la página anterior", "Ir para página anterior" },;
       { "&Next", "&Siguiente", "Pró&xima" },;
       { "Go to next page", "Ir a la siguiente página", "Ir para a próxima página" },;
       { "&Last", "&Ultima", "Ú&ltima" },;
       { "Go to last page", "Ir a la última página" },;
       { "&Zoom", "&Zoom", "&Zoom" },;
       { "Page zoom", "zoom de página", "zoom da página" },;
       { "&Normal", "&Normal", "&Normal" },;
       { "Page unzoom", "Página normal", "Página normal" },;
       { "&Factor", "&Factor", "&Fator" },;
       { "Zoom factor", "Factor de zoom", "Fator de zoom" },;
       { "Factor", "Factor", "Fator" },;
       { "&Two pages", "&Dos páginas", "&Duas páginas" },;
       { "Preview on two pages", "Previsualización en dos páginas", "Previsualização em duas páginas" },;
       { "One &page", "Una &página", "Uma pá&gina" },;
       { "Preview on one page", "Previsualización en una página", "Previsualização em uma página" },;
       { "Page number:", "Número de página:", "Número de página:" },;
       { "Go to first page", "Ir a la primera página", "Ir para a primeira página" },;
       { "First", "Primera", "Primeira" },;
       { "&Page", "&Página", "Pá&gina" },;
       { "Preview on one page", "Previsualización en una página", "Previsualização em uma páginas },;
       { "
Previous", "Anterior", "Anterior" },;
       { "
Next", "Siguiente", "Próxima" },;
       { "
Last", "Ultima", "Última" },;
       { "
Zoom", "Aumentar", "Aumentar" },;
       { "
Two pages", "Dos páginas", "Duas páginas" },;
       { "
Print", "Imprimir", "Imprimir" },;
       { "
Save to DOC/PDF", "Guardar como DOC/PDF", "Salvar como DOC/PDF" },;
       { "
DOC Format", "Formato DOC", "Formato DOC" },;
       { "
PDF Format", "Formato PDF", "Formato PDF" },;
       { "
Export to PDF", "Exportar a PDF", "Exportar em PDF" },;
       { "
Send by email as PDF", "Enviar por email como PDF", "Enviar por email em PDF" },;
       { "
Export to MS Word", "Exportar a MS Word", "Exportar paraa MS Word" },;  
       { "
Export to Excel", "Exportar a Excel", "Exportar para Excel" },;
       { "
Exit", "Salir", "Sair" },;
       { "
Preview", "Previsualización", "Previsualização" },;
       { "
Save as", "Guardar como", "Salvar como" },;
       { "
Printing", "Imprimiendo", "Imprimindo" },;
       { "
&Ok", "&Aceptar", "C&onfirmar" },;
       { "
&Cancel", "&Cancelar", "&Cancelar" },;
       { "
Printing range", "Rango de impresión" , "Intervalo de impressão" },;
       { "
All", "Todo", "Todo" },;
       { "
Current page", "Página actual", "Página atual" },;
       { "
Pages", "Páginas", "Páginas" },;
       { "
From", "Desde", "De" },;
       { "
To", "Hasta", "Até" } }
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: Introducing the new FW Strings API

Postby Kleyber » Mon Aug 05, 2013 10:24 pm

André,

I have made some reviews on Portuguese translation, now it's ok.

Code: Select all  Expand view

    static aStrings := { { "Attention", "Atención", "Atenção" },;
           { "PDF Plugin Error", "Error del plugin de PDF", "Erro do plugin do PDF"  },;
           { "PDF not saved to send Email", "No se ha guardado el PDF a enviar por email", "PDF não foi salvo para mandar por email"  },;
           { "MS Word not installed", "MS Word no está instalado", "MS Word não está instalado" },;
           { "Failed to Create Word Document", "No se ha podido crear el documento de Word", "Não foi possível criar o documento do Word" },;
           { "There is no output for export", "No hay nada que exportar", "Nada para exportar" },;
           { "No .Doc file manipulation software installed", "No hay instalado software para usar ficheros .Doc", "Não há software instalado para usar arquivos .Doc" },;
           { "not found, imposible to continue", "no se ha encontrado, no se puede continuar", "não encontrado, impossível continuar" },;
           { "Printing Error", "Error de impresión", "Erro de impressão" },;
           { "View", "¿ Visualizar", "Visualizar" },;
           { "Excel not installed", "Excel no está instalado", "Excel não está instalado" },;
           { "Report width is greater than page width", "El ancho del reporte es mayor que el ancho de la página", "A largura do relátorio é maior que a página" },;
           { "Export to Excel is available only", "Solo está disponible exportar a Excel", "Somente a exportação para o Excel está disponível" },;
           { "for Reports with ::bInit defined", "para reportes con ::bInit definido", "para relatórios com ::bInit definido" },;
           { "Printing Preview", "Previsualización de Impresión", "Previsualização da impressão" },;
           { "&File", "&Fichero", "Ar&quivos" },;
           { "&Print", "&Imprimir", "&Imprimir" },;
           { "Print actual page", "Imprimir la página actual", "Imprimir a página atual" },;
           { "&Exit", "&Salir", "&Sair" },;
           { "Exit from preview", "Salir de la previsualización", "Sair da previsualização" },;
           { "Page", "Página", "Página" },;
           { "&First", "&Primera", "&Primeira" },;
           { "Go to first page", "Ir a la primera página", "Ir para primeira página" },;
           { "&Previous", "&Anterior", "&Anterior" },;
           { "Go to previous page", "Ir a la página anterior", "Ir para página anterior" },;
           { "&Next", "&Siguiente", "Pró&xima" },;
           { "Go to next page", "Ir a la siguiente página", "Ir para a próxima página" },;
           { "&Last", "&Ultima", "Ú&ltima" },;
           { "Go to last page", "Ir a la última página" },;
           { "&Zoom", "&Zoom", "&Zoom" },;
           { "Page zoom", "zoom de página", "zoom da página" },;
           { "&Normal", "&Normal", "&Normal" },;
           { "Page unzoom", "Página normal", "Página normal" },;
           { "&Factor", "&Factor", "&Fator" },;
           { "Zoom factor", "Factor de zoom", "Fator de zoom" },;
           { "Factor", "Factor", "Fator" },;
           { "&Two pages", "&Dos páginas", "&Duas páginas" },;
           { "Preview on two pages", "Previsualización en dos páginas", "Previsualização em duas páginas" },;
           { "One &page", "Una &página", "Uma pá&gina" },;
           { "Preview on one page", "Previsualización en una página", "Previsualização em uma página" },;
           { "Page number:", "Número de página:", "Número de página:" },;
           { "Go to first page", "Ir a la primera página", "Ir para a primeira página" },;
           { "First", "Primera", "Primeira" },;
           { "&Page", "&Página", "Pá&gina" },;
           { "Preview on one page", "Previsualización en una página", "Previsualização em uma página },;
           { "
Previous", "Anterior", "Anterior" },;
           { "
Next", "Siguiente", "Próxima" },;
           { "
Last", "Ultima", "Última" },;
           { "
Zoom", "Aumentar", "Aumentar" },;
           { "
Two pages", "Dos páginas", "Duas páginas" },;
           { "
Print", "Imprimir", "Imprimir" },;
           { "
Save to DOC/PDF", "Guardar como DOC/PDF", "Salvar como DOC/PDF" },;
           { "
DOC Format", "Formato DOC", "Formato DOC" },;
           { "
PDF Format", "Formato PDF", "Formato PDF" },;
           { "
Export to PDF", "Exportar a PDF", "Exportar para PDF" },;
           { "
Send by email as PDF", "Enviar por email como PDF", "Enviar PDF por email" },;
           { "
Export to MS Word", "Exportar a MS Word", "Exportar para MS Word" },;  
           { "
Export to Excel", "Exportar a Excel", "Exportar para Excel" },;
           { "
Exit", "Salir", "Sair" },;
           { "
Preview", "Previsualización", "Previsualização" },;
           { "
Save as", "Guardar como", "Salvar como" },;
           { "
Printing", "Imprimiendo", "Imprimindo" },;
           { "
&Ok", "&Aceptar", "C&onfirmar" },;
           { "
&Cancel", "&Cancelar", "&Cancelar" },;
           { "
Printing range", "Rango de impresión" , "Intervalo de impressão" },;
           { "
All", "Todo", "Todo" },;
           { "
Current page", "Página actual", "Página atual" },;
           { "
Pages", "Páginas", "Páginas" },;
           { "
From", "Desde", "De" },;
           { "
To", "Hasta", "Até" } }
Kleyber Derick

FWH / xHb / xDevStudio / SQLLIB
User avatar
Kleyber
 
Posts: 581
Joined: Tue Oct 11, 2005 11:28 am
Location: São Luiz, Brasil

Re: Introducing the new FW Strings API

Postby elvira » Wed Aug 07, 2013 8:32 am

Antonio,

Is there any problema?.

will you be using this technique wherever possible in fwh ?

Thank you very much.
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: Introducing the new FW Strings API

Postby Antonio Linares » Wed Aug 07, 2013 9:33 am

Sorry guys for my answer delay, I am in the mountains on a workshop, I expect to return today or tomorrow.

Richard, and others,

many thanks for the translations. We will use this technique everywhere in FWH. So all strings will be adapted to use FWString().

Please remember that you can use it for your own strings too :-)

Its very nice to change the language at runtime and support many languages, without extra coding :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41439
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: cmsoft, Marc Venken and 37 guests