From: Isabelle V. <ver...@fr...> - 2011-02-25 18:49:35
|
Here is an example with some text in french in a file "lang/fr-lang.php" for the login page of Timesheet: --------------------------------------------------------------------- <?php include(dirname(__FILE__)."/../common.inc"); $ver = getVersion(); //------------------------------------------------------------------- // Some translations for login.php //------------------------------------------------------------------- define('_TSNGTXT_LOGIN_USERNAME', 'Utilisateur'); define('_TSNGTXT_LOGIN_PASSWORD', 'Mot de passe'); define('_TSNGTXT_LOGIN_HEADTITLE', 'TimesheetNextGen '.$ver.' | Connexion'); define('_TSNGTXT_LOGIN_TABLETITLE', 'Connexion à TimesheetNextGen '.$ver); ?> --------------------------------------------------------------------- And, for example, in the page "login.php", the line code for these html title of the page: --------------------------------------------------------------------- <title><?php echo _TSNGTXT_LOGIN_HEADTITLE; ?></title> --------------------------------------------------------------------- The result is, for example, for the title page of login.php: TimesheetNextGen 1.5.2 | Connexion For accented letters , the result is fine using html entities as in "_TSNGTXT_LOGIN_TABLETITLE". I hope this help you. Good week-end! Isabelle. ----- Mail Original ----- De: "Scott Miller" <sco...@gm...> À: "Isabelle Vergely" <ver...@fr...>, "tsheetx" <tsh...@li...> Envoyé: Vendredi 25 Février 2011 17:54:37 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [Tsheetx-developers] Proposal of contribution for a French version I'm unfamiliar with how this would work, could you give us a smaillish concrete example? -Scott On Thu, Feb 24, 2011 at 6:56 PM, Isabelle Vergely < ver...@fr... > wrote: David, and Scott, Regardless of the version of Timesheet, it seems to me that using gettext (GNU) is not very suitable because sometimes you have to translate sentences containing variables. In addition, sentence structure changes from one language to another. For me, it would be easier and more flexible to use language files (eg fr-lang.php) using define() instructions and to test the locale specified in the configuration of Timesheet to include the right language file. For the display of dates, I replaced all "date()" by "strftime()". Funny thing for the "French locale" with Timesheet: setlocale(LC_ALL, 'fr_FR') is not sufficient for to have all date formats correctly displayed in French. But, all dates are OK with setlocale(LC_ALL, 'fr_FR', 'fra'). Isabelle. ----- Mail Original ----- De: "David Thompson" < tom...@us... > À: "vergely isabelle" < ver...@fr... > Cc: tsh...@li... Envoyé: Jeudi 24 Février 2011 16:41:36 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: RE: [Tsheetx-developers] Proposal of contribution for a French version We have had a couple of people suggesting a translation, but you are the first to "produce the goods". Well done. The only question is how to sensibly integrate it. It comes under I18N problems. In the past we looked at php.gettext which would be relatively easy to use (especially that you have found all the text places to change - by translating them in place), but it depends a bit on your server setup. To be flexible, in the long term, my feeling is that it will need a user config field to define each user's locale, but you are probably OK with the global locale setting. Would you be able to contribute your changes as a developer? We would welcome any help you can give. Cheers tommo Date: Thu, 24 Feb 2011 15:15:05 +0100 From: ver...@fr... To: tsh...@li... Subject: [Tsheetx-developers] Proposal of contribution for a French version Hello, I'm French. For my work, I identified Timesheet Next Gen 1.5.2 as a good open source tool for recording the time spent on project tasks. Unfortunately, I quickly realized that its structure did not allow easily to have versions with other languages than English. I don't know if is planned a future version of Timesheet NG with a structure that facilitates its use for non-English speaking users by choosing the language and having different language files available. Whatever it is, I undertook the translation into French of the application (.php and .inc files, database field values like enum types) maintaining the current structure of Timesheet 1.5.2. This work is almost finished. Also, I made small changes to the display of some pages. So, I can contribute to the diffusion of Timeshheet Next Gen in French. Best regards. Isabelle. ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Tsheetx-developers mailing list Tsh...@li... https://lists.sourceforge.net/lists/listinfo/tsheetx-developers |