Multiple languages

Multiple languages

Postby Jeff Barnes » Thu Jul 04, 2019 4:38 pm

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?
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Multiple languages

Postby Joaquim Ferrer » Thu Jul 04, 2019 6:03 pm

Fivewinner desde 1.9, programador PHP y Javascript, PWA & HTML5 evangelista
User avatar
Joaquim Ferrer
 
Posts: 105
Joined: Sat Jan 14, 2012 3:46 pm
Location: Barcelona

Re: Multiple languages

Postby Silvio.Falconi » Thu Jul 04, 2019 8:03 pm

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7043
Joined: Thu Oct 18, 2012 7:17 pm

Re: Multiple languages

Postby Marc Venken » Fri Jul 05, 2019 8:04 am

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.
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1426
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Multiple languages

Postby Jeff Barnes » Fri Jul 05, 2019 1:43 pm

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?
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Multiple languages

Postby Jeff Barnes » Fri Jul 05, 2019 5:53 pm

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.
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 67 guests