Post by austurki@gmail.com » Sun Jul 07, 2019 3:50 pm

hi
is there any way to use different fonts for each language in opencart 2.3.0.2

thanks in advance

New member

Posts

Joined
Thu May 18, 2017 7:25 am

Post by DigitCart » Sun Jul 07, 2019 8:43 pm

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>

My Extensions / DigitCart


User avatar
Active Member

Posts

Joined
Thu Jun 22, 2017 5:32 pm

Who is online

Users browsing this forum: No registered users and 1 guest