GKContact - multilingual

Joomla webshop template with CSS3-based animations, VirtueMart support and one-page checkout.
GK User
Fri May 20, 2016 8:56 am
Dear All,
I want to run my site in several languages and I want to use GkContact for my contact page, but I need to extend it's funcionality.
I already know that for each language I need to prepare language file, but what if I want to use different:
PLG_GKCONTACT_ADDRESS_TITLE or
PLG_GKCONTACT_ADDRESS_VALUE or
PLG_GKCONTACT_ADDRESS_FOOTER ?
Is it possible to use f.eg. {GKCONTACT2} with different setting or to put php code with language variables?
User avatar
Senior Boarder

GK User
Sat May 21, 2016 2:48 pm
Hey, thanks for help.
I did this by my own.

To handle that, you need to:
1. edit "plg_gkcontact.php" (/plugins/system/plg_gkcontact) and change the line 58:
FROM:
$output .= '<p class="gkContactFooter">' . $this->params->get('address_footer') . '</p>';
TO:
$output .= '<p class="gkContactFooter">'.JText::_('PLG_GKCONTACT_MYTEXT').'</p>';

2. now just put the desired text in the languade files. For polish just add the line in the files "pl-PL.plg_system_gkcontact.ini" and "pl-PL.plg_system_gkcontact.sys.ini" (/language/pl-PL):
PLG_GKCONTACT_MYTEXT="Desired text"
For each language you need to put those line to work. If you don't have you language file, you must first copy the oryginal en files from: /language/eb-EN.
Thats all! ;)
User avatar
Senior Boarder

GK User
Sat May 21, 2016 3:10 pm
unfortunatly, something's missing...
it sometimes work, sometimes not.
Working workaround is just to use already defined string, f.eg: PLG_GKCONTACT_NO_RECIPENT_INFO.
using this instead of PLG_GKCONTACT_MYTEXT works perfectly!
User avatar
Senior Boarder

GK User
Sat May 21, 2016 3:19 pm
:D
Ok, I've found the problem - there are also language files placed in /administrator/language/ - just add there lines with "PLG_GKCONTACT_MYTEXT" and everything works as a charm!
:evil:
User avatar
Senior Boarder

teitbite
Fri May 27, 2016 9:35 am
Hi

Ok. Great to hear it's working. Closing this thread than.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.