Page 1 of 1

use different fonts for each language

Posted: Sun Jul 07, 2019 3:50 pm
by austurki@gmail.com
hi
is there any way to use different fonts for each language in opencart 2.3.0.2

thanks in advance

Re: use different fonts for each language

Posted: Sun Jul 07, 2019 8:43 pm
by DigitCart
Hi
yes, here is an example:

edit this file:
catalog\controller\common\header.php

Find:

Code: Select all

$this->load->language('common/header');
Add after:

Code: Select all

$data['language_code'] = $this->session->data['language'];
Edit your theme header file:
catalog\view\theme\*\template\common\header.tpl

Find:

Code: Select all

</head>
Add before it:

Code: Select all

<style type="text/css">
<?php if ($language_code == 'en-gb') { ?>
  body {font-family: serif;}
<?php } ?>
<?php if ($language_code == 'fa-ir') { ?>
  body {font-family: tahoma;}
<?php } ?>
</style>