vtiger Forum Index vtiger
The Honest Open Source CRM
 

Customer Portal 504 - supports multiple languages + Greek
Click here to go to the original topic
Goto page 1, 2  Next
 
       vtiger Forum Index -> Customer Portal
Previous topic :: Next topic  
Author Message
CyberTiger



Joined: 25 Apr 2008
Posts: 29

Posted: Fri May 09, 2008 1:46 am    Post subject: Customer Portal 504 - supports multiple languages + Greek  

Hello all,

i didnt quite like the ad-hoc translations for customer portal, so i did a bit of work on that.

Features supported
- Any number of languages at the same time
- Language selection via drop down menu
- Support for selection of default language to initially display
- Extended collection of strings and messages to be translated.
- Comes with english and greek translation

To add languages edit the portalconfig.php as you would do for vTiger (add new language string and set default). Also go into the languages folder and make a copy of the en_us.lang.php. Rename the copy to match your new language extension (as defined in config) and edit the strings...

Please, please, if you test it and are happy with it, please do post a reply to say so....the only reason why i spent so many hours doing it was for the mere satisfaction of seeing everyone enjoying it! :D

Please note that this is not the whole customerportal package.It only contains the files that i changed plus the aknowledgements etc *.txt files.

Many thanks and keep up the great work everyone !!!

CyberTiger - AA
Back to top  
pribeli



Joined: 09 May 2008
Posts: 36
Location: Hungary

Posted: Fri May 09, 2008 1:15 pm    Post subject: Re: Customer Portal 504 - supports multiple languages + Gree  

Hi CyberTiger,

Thank you for sharing this, very comprehensive add-on which arrived in the right time from my point of view (working on the CP translation). I just have finished a short test and works fine for me. Pls find attached my review/comments, hope this helps fine tuning your great solution.

Many thanks :wink:
Back to top  
CyberTiger



Joined: 25 Apr 2008
Posts: 29

Posted: Fri May 09, 2008 2:37 pm    Post subject: Re: Customer Portal 504- supports multiple languages + Greek  

Hi Pribeli,

and many thanks for your feeback. I have now applied the changes to the lines i omitted in the previous version. Please find attached the new version of the files.

In the zip file i have included the file with your suggestions with some inline comments of mine. Can you take a look and see if you can help with an issue i am having with the authenticate.php script?

I am glad you found it useful...when i have some more time i might tidy up the translation strings a bit more...But i think its a nice thing to have translation strings with a prefix that indicates the container (BTN_, LBL_, MSG_ etc).

Many thanks!
Back to top  
joebordes



Joined: 18 Aug 2006
Posts: 1089
Location: Alicante/Valencia, Spain

Posted: Fri May 09, 2008 11:51 pm    Post subject: Re: Customer Portal 504 - supports multiple languages + Gree  

Hi,

Quite don't understand why you didn't base your work on the code that can be found here:
http://forums.vtiger.com/viewtopic.php?t=18274
as you had (almost) all the hard coded strings already extracted.

In any case your work is very interesting, it was something I had on my todo list to get around to doing someday.
I have integrated your multilingual changes into my translated version and changed a few small things (nothing important).
I didn't go to the work of changing your labeling although it does seem more logical than mine.

I found a few things you may like to change on your version:
- syntax error in javascript formvalidate() in NewTicket.php
- pending hard coded strings in TicketDetail, FAQDetail, Faq/index.php and login

Thanks for your contribution.
Joe
TSolucio
Back to top  
pribeli



Joined: 09 May 2008
Posts: 36
Location: Hungary

Posted: Fri May 09, 2008 11:52 pm    Post subject: Re: Customer Portal 504- supports multiple languages + Greek  

Thank you CyberTiger for your quick response/upgrade, works correctly! Since non-latin-1 chars (I mean Latin-2) display correctly in my local test environment, I suggest to go through the following list step-by-step and see what happens:

1. Check that your el_gr.lang.php encoding is changed from ANSI to UTF-8 when you save the file

2. Check your default charset in Apache httpd.conf file and set to AddDefaultCharset UTF-8 (usually it is set to ISO-8859-1 by default)

3. Change every instance of $GLOBALS['charset'] to $GLOBALS['default_charset'] in *.php

4. Change the following line in root/soap/customerportal.php to your local language
require_once('modules/HelpDesk/language/en_us.lang.php'); -> el_gr.lang.php

Hope that any of these helps, let me know what happens.
Back to top  
joebordes



Joined: 18 Aug 2006
Posts: 1089
Location: Alicante/Valencia, Spain

Posted: Sat May 10, 2008 12:07 am    Post subject: Re: Customer Portal 504 - supports multiple languages + Gree  

Hi,

The TSolucio version can be obtained at the subversion repository indicated in the aforementioned thread and also I have just uploaded the version to the forge project:

http://forge.vtiger.com/projects/mul-lang-portal/

Any feed back is welcome.

Joe
TSolucio
Back to top  
eeryelf



Joined: 12 Jul 2008
Posts: 4
Location: Greece

Posted: Mon Jul 14, 2008 11:26 am    Post subject: Re: Customer Portal 504 - supports multiple languages + Gree  

Awesome Work, Thank you very much, but i do have a small problem, when i click on the forgot password link and the popup window arises i am not able to see the greek content. Instead of the greek words i see very strange symbols.

Moreover when i put the email and click to send how can i translate the message "Mail has been sent to your mail id with the customer portal login details". Can you help me fix these pls.

Kostas
Back to top  
joebordes



Joined: 18 Aug 2006
Posts: 1089
Location: Alicante/Valencia, Spain

Posted: Mon Jul 14, 2008 4:41 pm    Post subject: Re: Customer Portal 504 - supports multiple languages + Gree  

Hi,

I don't know about the strange text coming up on the popup screen, it works correctly on my installations, maybe you could have a look at the html source to see if that gives any clue.

As to the English text screen coming in, it is coming from the vtigerCRM base installation so you will have to modify the customerportal.php:send_mail_for_password() function to get it send you back the string in the desired language. At this moment, the customerportal and vtigerCRM don't interchange language information so all text that comes back from vtigerCRM is always in english or in some forced base language

Joe
TSolucio
Back to top  
pribeli



Joined: 09 May 2008
Posts: 36
Location: Hungary

Posted: Mon Jul 14, 2008 6:15 pm    Post subject: Re: Customer Portal 504 - supports multiple languages + Gree  

Hi,

Just some supplementary info though this will partly resolve your problem (and mine also). I hope it helps to better understand the logic behind and point out what/how should be changed.

1. When your login fails on Portal login screen you can see e.g. "Please enter a valid Username and Password". This is hardcoded to CRM/soap/customerportal.php (look for function authenticate_user). It will display whatever you replace with.

2. When you click "Forgot password" on Portal login screen, Portal/supportpage.php is called. Supportpage.php then checks for the language you set for "user_lang" in PortalConfig.php and displays the popup in that language.

3. When you click "Send password" on the popup, my guess is that process is managed by CRM/soap/customerportal.php which has no clue what your Portal/customer's language preference is (joebordes described the reason). Furthermore, probably for the same reason you can see the reference "require_once('modules/HelpDesk/language/en_us.lang.php');" which causes the following:
- english speaking reminder e-mail sent to the customer
- english speaking popup after clicking "Send password"
If you change the language reference in require_once() to your locale set in config.inc.php (el_gr.lang.php), translated reminder email will be sent and popup window partly gets translated (message only, button and prompts are still english). This answers your second question. I couldn't figure out till now, where can this be changed to manage 100%.

Hope this helps a little bit.
Back to top  
pribeli



Joined: 09 May 2008
Posts: 36
Location: Hungary

Posted: Mon Jul 14, 2008 7:51 pm    Post subject: Re: Customer Portal 504 - supports multiple languages + Gree  

Regarding your second question you can get 100% translated the dialog if you simply hardcode your user_lang into Portal/supportpage.php e.g. by replacing
Code:  $customer_language = $_REQUEST['user_lang'];
with
Code: $customer_language = 'el_gr';
Back to top  
 
       vtiger Forum Index -> Customer Portal Goto page 1, 2  Next
Page 1 of 2


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group