Language support

Ask your questions regarding TimeTrex installation here.
Locked
tarelli
Posts: 5
Joined: Mon Aug 25, 2008 2:45 am

Language support

Post by tarelli »

the installation of timetrex end ok, i solved the problem and go to the end of installation, but in login form i select italian(beta) and is not work. timetrex show me the message and the interface in english, for all language i select, spanish, french.. show me only english.
please help me thanks.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

tarelli
Posts: 5
Joined: Mon Aug 25, 2008 2:45 am

Post by tarelli »

I'm sorry, i use Ubuntu Server Edition 8.04 - 2.6.24-19, PHP: V.5.2.4-2, Timetrex: V.2.2.13, Web Server: Apache2, MySQL: 5.0.51a-3ubuntu5.1

If i set verbose=11 in timetrex.ini.php show me this error:

(mysqlt): SET SESSION sql_mode='ansi' (mysqlt): SET TRANSACTION ISOLATION LEVEL READ COMMITTED (mysqlt): SET SESSION time_zone='Europe/Berlin'
Fatal error: Call to a member function getId() on a non-object in /var/www/timetrex/interface/index.php on line 54

If i set verbose=10 in timetrex.ini.php, in login form show me this messages:

Debug Buffer
============================================================================
Memory Usage: 3719264
----------------------------------------------------------------------------
DEBUG [264]: [Function](): URI: /timetrex/interface/Login.php
DEBUG [266]: [Function](): Version: 2.2.13 Edition: 10 Production: 1 Demo Mode: 0
DEBUG [111]: TTDate::setTimeZone(): Setting TimeZone: Europe/Berlin
DEBUG [54]: [Function](): Bypassing Authentication
DEBUG [400]: TTi18n::chooseBestLocale(): Choosing Best Locale...
DEBUG [408]: TTi18n::chooseBestLocale(): Using Language from cookie: it_IT.UTF-8
DEBUG [318]: TTi18n::setLocale(): Generated/Passed In Locale: it_IT.UTF-8
DEBUG [252]: TTi18n::generateLocale(): Array of Locales to try in order: it_IT.UTF-8,it_IT.UTF-8.UTF-8,en_US,en_US.UTF-8,en,en.UTF-8
DEBUG [211]: TTi18n::tryLocale(): Found valid locale: it_IT.UTF-8
DEBUG [324]: TTi18n::setLocale(): Attempting to set Locale(s) to: it_IT.UTF-8 Category: 6 Current Locale:
DEBUG [327]: TTi18n::setLocale(): Setting currency/numeric Locale to: it_IT.UTF-8
DEBUG [340]: TTi18n::setLocale(): Setting translator locale to: it_IT
DEBUG [357]: TTi18n::setLocale(): Set Master Locale To: it_IT.UTF-8
DEBUG [463]: TTi18n::chooseBestLocale(): Using Locale: it_IT.UTF-8
DEBUG [287]: TTi18n::getLanguageFromLocale(): Locale: it_IT.UTF-8
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 0.0000 ms (0.00 %) unprofiled

97.3089 ms (100.00 %) Missed
============================================================================
97.3089 ms (100.00 %) OVERALL TIME
============================================================================

and after login in user page show me this:

Debug Buffer
============================================================================
Memory Usage: 9164996
----------------------------------------------------------------------------
DEBUG [264]: [Function](): URI: /timetrex/interface/index.php
DEBUG [266]: [Function](): Version: 2.2.13 Edition: 10 Production: 1 Demo Mode: 0
DEBUG [111]: TTDate::setTimeZone(): Setting TimeZone: Europe/Berlin
DEBUG [497]: Authentication::Check(): Session Name: SessionID
DEBUG [503]: Authentication::Check(): Session ID: 00e2269eb55b3220e10c90c8e9dd176e
DEBUG [399]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:00e2269eb55b3220e10c90c8e9dd176e
DEBUG [78]: Authentication::getIdle(): Idle Seconds Allowed: 14400
DEBUG [399]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:00e2269eb55b3220e10c90c8e9dd176e
DEBUG [70]: [Function](): User Authenticated: sigeo Created Date: 1219745474
DEBUG [1961]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [111]: TTDate::setTimeZone(): Setting TimeZone: Europe/Rome
DEBUG [139]: TTDate::setDateFormat(): Setting Default Date Format: d/m/Y
DEBUG [153]: TTDate::setTimeFormat(): Setting Default Time Format: G:i
DEBUG [167]: TTDate::setTimeUnitFormat(): Setting Default Time Unit Format: 10
DEBUG [102]: [Function](): Locale Cookie: it_IT.UTF-8
DEBUG [287]: TTi18n::getLanguageFromLocale(): Locale: it_IT.UTF-8
DEBUG [110]: [Function](): User Preference Language matches cookie!
DEBUG [318]: TTi18n::setLocale(): Generated/Passed In Locale:
DEBUG [252]: TTi18n::generateLocale(): Array of Locales to try in order: it_IT,it_IT.UTF-8,it,it.UTF-8,en_US,en_US.UTF-8
DEBUG [211]: TTi18n::tryLocale(): Found valid locale: it_IT.UTF-8
DEBUG [324]: TTi18n::setLocale(): Attempting to set Locale(s) to: it_IT.UTF-8 Category: 6 Current Locale:
DEBUG [327]: TTi18n::setLocale(): Setting currency/numeric Locale to: it_IT.UTF-8
DEBUG [340]: TTi18n::setLocale(): Setting translator locale to: it_IT
DEBUG [357]: TTi18n::setLocale(): Set Master Locale To: it_IT.UTF-8
DEBUG [1961]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [1143]: UserPreferenceFactory::isPreferencesComplete(): User Preferences IS Complete:
DEBUG [139]: [Function](): Station ID Cookie found! 4a519d57a06bbf249761814bf24c4585
DEBUG [243]: [Function](): UnRead Messages: 0
DEBUG [48]: BreadCrumb::setCrumb(): Dropping Bread Crumb: Home URL: /timetrex/interface/index.php
DEBUG [147]: [Function](): Request Hierarchy ID:
DEBUG [151] Array: [Function](): Request Levels


DEBUG [1517]: CompanyFactory::getLogoFileName(): Logo File Name: /var/timetrex/storage//company_logo/1/logo.jpg
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 30.7720 ms (8.87 %) Authentication::Check()
1 22.4271 ms (6.47 %) Interface.inc - Check for Exceptions
1 13.9041 ms (4.01 %) Interface.inc - Check for UNREAD messages...
2 3.4721 ms (1.00 %) getEmptyRecordSet()
1 19.6838 ms (5.67 %) setLocale()
1 128.7994 ms (37.13 %) unprofiled

127.8265 ms (36.85 %) Missed
============================================================================
346.8850 ms (100.00 %) OVERALL TIME
============================================================================

I set php to log error to file, but no error is present.

Thank you !
tarelli
Posts: 5
Joined: Mon Aug 25, 2008 2:45 am

Post by tarelli »

Sorry, php log report only this error if i set verbose=11 in timetrex.ini.php:

[26-Aug-2008 12:03:55] PHP Fatal error: Call to a member function getId() on a non-object in /var/www/timetrex/interface/index.php on line 54
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

DEBUG [340]: TTi18n::setLocale(): Setting translator locale to: it_IT
According to the debug output, TimeTrex changed the language to Italian, why its not actually displaying the text in that language I'm not sure.

I do know Ubuntu is well known for having problems with locales, but there isn't much I can suggest short of having one of our support staff login to your system to troubleshoot the issue, however this does require a support package.
tarelli
Posts: 5
Joined: Mon Aug 25, 2008 2:45 am

Post by tarelli »

I have probably resolved the problem.
in my ubuntu box, has given the followings commands:

sudo locale-gen it_IT (or any other language fr_FR etc)
sudo dpkg-reconfigure locales

and after i copy the contents of /timetrex/interface/locale in /usr/lib/locale/

I don't know if it is the correct procedure but it works.
tarelli
Posts: 5
Joined: Mon Aug 25, 2008 2:45 am

Post by tarelli »

it probably depends on the fact that in my ubuntubox it was present only it_IT.UTF-8 and not it_IT.
Locked