1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

Kayako multi-country setup

Discussion in 'Using Kayako Classic' started by Leroy Ramdjan, Apr 9, 2013.

  1. Leroy Ramdjan

    Leroy Ramdjan New Member

    Hi,

    I'm responsible for the setup of our current Kayako system.
    We have been using Kayako for nearly 2 years on a single country setup. Now we are expanding to other countries so I have been setting up Kayako such that we can serve different sets of customers.

    What have I done:
    - Set up departments per country(tickets & chats)
    - Set up staff groups
    - Installed and reviewed language packs
    - Created multiple user groups(Guest & Registerd per country)
    - Created multiple template groups(Each language tied to the respective user groups)

    What we want:
    - Spanish customer on our support page changes language to spanish, if he submits a ticket or registers he should be added to the spanish guest or registered user group.
    - A logged in spanish customer should see the ticket department assigned to that user group and not the other ones.
    - A guest on our support center with language set to spanish should see the spanish ticket departments. Ideally the language should be set based on GEO location

    What happens:
    - If i register with language set to spanish I get added to the Dutch registered group.
    - When i log in with this user I only see the departments tied to the Dutch user groups.

    What am I missing here to complete this setup?
     
  2. Gary McGrath

    Gary McGrath Staff Member

    Hi there Leroy,

    I think here you would need to use template groups ( as in template groups you can set the "registered group" etc.. )

    I think you might need to tweak it however to "force" a template group change, when changing the language.
    To do that, you will need to tweak the base code.

    File: class.Controller_Language.php
    Location: __swift\apps\base\client

    Around line 70 in this file, you will see this line: $_languageCache = $this->Cache->Get('languagecache');

    Just before this line, the following code will need to be added.

    if ($_languageID == 1){
    $this->_LoadTemplateGroup('Default');
    }
    if ($_languageID == 2){
    $this->_LoadTemplateGroup('MyTemplateName');
    }
    if ($_languageID == 3){
    $this->_LoadTemplateGroup('MyThirdTemplateName');
    }

    You just need to repeat the if statements per language you have installed, and then load the relevant template group by name. ( you can get the language ID by hovering over the installed language within the admin CP

    Gary
     
  3. Leroy Ramdjan

    Leroy Ramdjan New Member

    Hi Gary,

    Thanks for your reply.

    Like I mentioned in my opening post, the template groups have been configured.
    We currently have 4 templates groups:
    Default > Guest-NL / Registered-NL > language: Dutch
    Espana > Guest-ES / Registered-ES > language: Spanish
    Italia > Guest-IT / Registered-IT > language: Italian
    Nederlands > Guest-NL / Registered-NL > language: Dutch

    It is not possible to have none of these set to default.
    Since each template group has a seperate language and seperate guest and registered group it seems to me that Kayako handles this wrong?
    Or are these settings only to have a registered spanish user logon and have the default language set to spanish?

    The thing is, that works for registered users, but not guests, and that is an option in the template group aswell.
    Btw we are running Kayako 4.40.986 and are planning to update this soon rather than later.

    If there really isnt an option in Kayako to have users register to a certain user group then we will have to give your option a try.

    Leroy
     
  4. Gary McGrath

    Gary McGrath Staff Member

    Hi Leroy,

    The issue is that "languages" are independent of template groups. ( e.g you can be in any template group and change your language to whatever you wish that template group to be displayed in )

    So the code tweak I posted above is to actually link them, so that if you chose language abc, it forces a change to the "linked" template group abc.

    Gary
     
  5. Hi everyone,

    we just had the same issue. But we had some problems and want to share our solutions:

    1. After patching the language controller as described, we found a problem. When we switched to the language, that does not use the default template group, all links included the template group name. So after clicking a link, we had the template group name in the URL. If we then switched the language again, the template group name will be kept in the URL, so the language won't change.
    We fixed this by patching the language controller (__swift/apps/base/client/class.Controller_Language.php) again. We replaced the line
    header('location: ' . $_SERVER['HTTP_REFERER']);
    with
    // We remove the template group name from the url if present, otherwise
    // the language change doesn't work.
    $referer = $_SERVER['HTTP_REFERER'];
    $referer = preg_replace('/index\.php\?\/(LIST_OF_TEMPLATE_GROUP_NAMES_SEPARATED_BY_PIPES)/', 'index.php?', $referer);
    header('location: ' . $referer);

    2. If you navigate to the detail page of a knowledgebase article, whose category is only available in English and then change the language to German, you get a blank page. The reason is, that Kayako is not allowed to load the category with German selected as the language. So it throws an exception, which never gets caught.
    We fixed this, by simply redirecting the user to the knowledgebase home page.
    For this we changed the line 131 "return false;" in the file __apps/knowledgebase/client/class.Controller_List.php to
    // Redirect to knowledgebase home, if category is not allowed.
    header('Location: ' . SWIFT::Get('swiftpath') . 'index.php?/Knowledgebase/List');
    exit;

    Regards,
    Kai Strecker
     

Share This Page