kirilkirkov / Ecommerce-CodeIgniter-Bootstrap

Responsive, Multi-Vendor, MultiLanguage Online Store Platform (shopping cart solution)
MIT License
1.31k stars 952 forks source link

Making the Persian(FA) the default site language and remove English(EN) #236

Closed MassaM-SDC closed 2 years ago

MassaM-SDC commented 2 years ago

Is there a way to remove the default English(EN) and keep only Persian(FA)?

In case possible, in which php code can I do that?

surepeps commented 2 years ago

Yes you can there should be a class or library for languages

surepeps commented 2 years ago

Check the following path you can change the language

application/config/config.php

Line 98 you can change it from English to what you want .....

MassaM-SDC commented 2 years ago

@surepeps

Many thanks. I did the changes below and it loads the Farsi by default on site load instead of English.

/*
$config['language'] = 'english';
$config['language_abbr'] = 'en';
$config['currency'] = '€';
$config['currencyKey'] = 'EUR';
*/

$config['language'] = 'farsi';
$config['language_abbr'] = 'fa';
$config['currency'] = 'Rial';
$config['currencyKey'] = 'IRR';

But, the English option still remains as a select in the list.

What I am trying to achieve is single language by default and no selections be given.

Where in the code would I need to edit to achieve that?

MassaM-SDC commented 2 years ago

OK. I got the languages select option disabled by changing the code as below.

On the loaded template header file, I did this simple hack.

//$num_langs = count($allLanguages);
$num_langs = 0;

And it removed the select box completely.