Page 1 of 1

Multiple languages

Posted: Thu Jul 04, 2019 4:38 pm
by Jeff Barnes
I am starting a new application and this time I am going to attempt to make it available in multiple languages (going to start with English, French and Spanish).

Since I have not tried this before I was wondering what is the best approach to doing this?

Re: Multiple languages

Posted: Thu Jul 04, 2019 6:03 pm
by Joaquim Ferrer

Re: Multiple languages

Posted: Thu Jul 04, 2019 8:03 pm
by Silvio.Falconi
with my web sites (php) I use daily Poedit ( wordpress, Woocommerce,Prestashop)
I would like to use this procedure in fivewin but I don't know if it conflicts with the system that Antonio Linares did. Now however many sources have the functions of antonio Fw_string () and it will be difficult to use _txt automatically unless Antonio Linares makes it compatible the procedure

Re: Multiple languages

Posted: Fri Jul 05, 2019 8:04 am
by Marc Venken
I would use folowing :

Create a language file with as much languages that you want (even some extra that are not in your intension today

In the setup you let the customer take the language they want. (Englisch ex. as the standart)

Your program reads the languages onces at startup in a array or a Tdatabase object. You program the array for all output on screen/printing you want

You can also (I would) make a small Xbrowse related update languages file.

Image

The customers can than update like they want to. Also handy is you get a New customer in a languages that you don't have. Give him a 10% discount if he fill in all languages items for his languages and send the file to U. New languages (customers) can be found this way.

Re: Multiple languages

Posted: Fri Jul 05, 2019 1:43 pm
by Jeff Barnes
I tried getting a POT file but the file that is created just says it was created by Harbour but nothing else in it.
#
# This file is generated by Harbour 3.0.0 (Rev. 16951)
#

I added this to my make file to generate the POT file:
-po=lang


Any ideas?

Re: Multiple languages

Posted: Fri Jul 05, 2019 5:53 pm
by Jeff Barnes
Should have mentioned, the -po=lang is in a .hbm file.

So I guess I need to know the proper formatting to put this in the .hbm file.

If I do this using: harbour -j myapp.prg (from the command line) it seems to work but I need to figure out how to do it from the .hmb file.