Language and country selection - Not compatible.

Discussion in 'Installation/Configuration' started by Bookworm, Aug 2, 2013.

  1. Bookworm

    Bookworm Member

    On Ubuntu Precise, running ISPConfig, there's just a wee problem.

    Supposedly, you set the language and country in *bzzt* - Wrong.

    Here's the line of code from /usr/local/ispconfig/interface/lib/

    $conf['language'] = 'en';

    Here's the relevant line of code from /usr/local/ispconfig/interface/web/client/form/client.tform.php

    'country' => array (
    'default' => (isset($conf['language']) ? strtoupper($conf['language']) : ''),

    Here's the problem. Reading 'en' from the, then moving it to upper case, returns EN. EN is NOT a country code, so new client creation says that you have English as your language, but you live in Andorra. If you change the 'en' to 'us', you get a default language of Polish, but your country is the United States.

    'GB' for example, uses 'en' for their language. Belgium - they have a choice of languages. Same with Switzerland. Canada? French or English, and neither FR or EN is the same as CA.

    I strongly urge that the $conf variable array contain a 'country' as well as 'language'. (This is what I did as a test, and it works fine. Language = 'en', and country = 'us'. )
  2. ninjastu

    ninjastu New Member

    I found the same issue and below is what I did to fix this if anyone else want's to achieve this also while waiting for a fix. Just adjust for your own country.

    vim /usr/local/ispconfig/interface/lib/
    add the $conf['country'] = 'gb'; variable as below (adjust for your own country)
    //** Default Language and Timezone
    $conf['language'] = 'en';
    $conf['country'] = 'gb';
    $conf['debug_language'] = false;

    vim /usr/local/ispconfig/interface/web/client/form/client.tform.php
    Change the following line
    (isset($conf['language']) ? strtoupper($conf['language']) : ),
    (isset($conf['language']) ? strtoupper($conf['country']) : ),



Share This Page