Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello friends
i downloaded a template .
i want to change some of parts to persian.
my page is like below.
HTML
<!DOCTYPE html>
<html  lang="en">
<head>
    <title>hello</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta name="description" content="">
	<!--<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">-->
    <link rel="stylesheet" href="css/reset.css" type="text/css" media="screen">
    <link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
	<link rel="stylesheet" href="css/zerogrid.css" type="text/css" media="screen">
	<link rel="stylesheet" href="css/responsive.css" type="text/css" media="screen">
	<script src="js/css3-mediaqueries.js"></script>
    <script src="js/jquery-1.6.3.min.js" type="text/javascript"></script>
    <script src="js/cufon-yui.js" type="text/javascript"></script>
    <script src="js/cufon-replace.js" type="text/javascript"></script>
    <script src="js/NewsGoth_400.font.js" type="text/javascript"></script>
	<script src="js/NewsGoth_700.font.js" type="text/javascript"></script>
    <script src="js/NewsGoth_Lt_BT_italic_400.font.js" type="text/javascript"></script>
    <script src="js/Vegur_400.font.js" type="text/javascript"></script>
    <script src="js/FF-cash.js" type="text/javascript"></script>
    <script src="js/jquery.featureCarousel.js" type="text/javascript"></script>
    <script type="text/javascript">
      $(document).ready(function() {
        $("#carousel").featureCarousel({
			autoPlay:7000,
			trackerIndividual:false,
			trackerSummation:false,
			topPadding:50,
			smallFeatureWidth:.9,
			smallFeatureHeight:.9,
			sidePadding:0,
			smallFeatureOffset:0
		});
      });
    </script>
	<!--[if lt IE 7]>
    <div style=' clear: both; text-align:center; removed: relative;'>
        <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
        	<img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
        </a>
    </div>
	<![endif]-->
    <!--[if lt IE 9]>
   		<script type="text/javascript" src="js/html5.js"></script>
        <link rel="stylesheet" href="css/ie.css" type="text/css" media="screen">
	<![endif]-->
</head>
<body id="page1">
	<div class="extra">
    	<!--==============================header=================================-->
.
.
.
        <header>
</header>
        <!--==============================content================================-->
.
.

	<!--==============================footer=================================-->   

i changed code like below.
HTML
<html  xmlns="http://www.w3.org/1999/xhtml" xml:lang="fa" lang="fa">
<head>
    <title>;/title>

    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


but in my page just en characters has been showed and fa characters has not been showed.
for example :
when i type "Home page k(fa characters)z" in page it be like below
"Home page kz" . it means fa characters is invisible.
thanks for your reply.
Posted
Comments
[no name] 26-May-14 11:45am    
What is meant by persuian? Did you mean Persian?
mahmoodof 26-May-14 11:50am    
yes - persian
sorry
i typed it wrong

1 solution

Same way as any other language. There is nothing special to do, because Persian is supported by default on all modern systems. You only need to use Unicode. You should save your text of the HTML pages in UTF-8, and always prescribe it in the HTTP-EQUIV:
HTML
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <!-- ... -->
   </head>
   <body>
      <!-- ... -->
   </body>
</html>


See also:
http://en.wikipedia.org/wiki/Arabic_script[^],
http://en.wikipedia.org/wiki/Unicode[^],
http://unicode.org[^],
http://en.wikipedia.org/wiki/UTF[^],
http://en.wikipedia.org/wiki/UTF-8[^],
http://www.unicode.org/faq/utf_bom.html[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900