how to use cufon font replacement to use hindi and english

Moderator: imanickam

Locked
kdji123
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Mar 26, 2010 7:55 pm

how to use cufon font replacement to use hindi and english

Post by kdji123 » Sun Apr 25, 2010 10:38 am

hi,
i want to use cufon in my site but my problem is that i can use it for either for hindi or for english, but the content on my site are in both language.so can any help me out.
REGARDS.

User avatar
ronakbhagdev
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 186
Joined: Tue Jan 15, 2008 12:14 pm
Location: Morbi - INDIA

Re: how to use cufon font replacement to use hindi and english

Post by ronakbhagdev » Sun Apr 25, 2010 7:38 pm

Hi,

Are you using Joomfish on your site or you have mixed content on the site?

If you have used Joomfish then insert the following code in the head (between <script> tag)

Code: Select all

<?php if ($this->language=="en-gb") { ?>
Cufon.replace('body', { fontFamily: 'FontForEnglish' });
<?php } 
else if($this->language=="hi-in")
{ ?>
Cufon.replace('body', { fontFamily: 'FontForHindi' });
<?php } ?>

If you have NOT used Joomfish then insert the following code in the head (between <script> tag) and wrap the Hindi content within <div class="hicontent"></div> and wrap the English content within <div class="encontent"></div>

Code: Select all

Cufon.replace('.encontent', { fontFamily: 'FontForEnglish' });
Cufon.replace('.hicontent', { fontFamily: 'FontForHindi' });
Hopefully this should work!
@RonakBhagdev
Coordinator of Joomla Gujarati
Soft 'n' Web : http://www.softnweb.com


Locked

Return to “Indic Languages Forum”