problem with hebrew in wordpress - wordpress

i want to change the SearchForm.php file in my wordpress themes to hebrew.
i mean i want to see 'חפש' (hebrew text) instead of 'search for '.
when i change it i see gebrish.
why ??
thanks.

You need to make sure that the content-type of the page is the correct one - normally UTF-8 would work for all languages.
You can use a meta tag within the head element:
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
For Hebrew it is iso-8859-8.
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-8">
This is normally already setup within the template and you can look at your settings to see if it is correct - In Settings -> Reading, under "Encoding for pages and feeds".
You also need to be sure that the page is saved as UTF-8 and not ascii - check your text editor settings.

Related

why I cannot find my website in google search when search in Arabic language?

I cannot find my website when search in google and using Arabic language .
In English language I can find the site direct but the issue in Arabic language not appear .
I tried this code in my main layout and used meta and title as all sites recommended :
<head>
<meta name="viewport" content="width=device-width" />
<title>مختبرات القمة الطبية</title>
<meta name="description" content="مختبرات القمة الطبية ترحب بكم وتقدم لكم افضل الخدمات وافضل كادر طبي واحدث اجهزة التحاليل الطبية في مدينة الطائف " />
<meta name="keywords" content="alqemah,alqemahlab,alqemah laboratory,laboratory,القمه,مختبر القمه ,مختبر القمة الطائف ,مختبر القمة,مختبرات طبية,مختبرات القمة الطبية"/>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
what I need to do to find website when search in Arabic language in google
your kind help please ?
I'm not seeing the appropriate tags for telling Google about your site languages.
You need to use x-default for the default language and you need to add multiple hreflang links to specify alternate version of your pages, in each page. You could also achieve this by using hreflang in your sitemap.
Have a look at Google's documentation: Managing multi-regional and multilingual sites.

Arabic text on masterpage is corrupted like لوحة المعلومات

I have asp.net web application using Arabic language ,I published it and host it on Godaddy .
there is no problem when I get Arabic text from database.
But the text in master page like labels it's appear like لوحة المعلومات
this problem in master page only , not for all pages ,
I tried to use
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
but the text still appear like لوحة المعلومات (only in masterpage)
How can I fix it ?
open the asp page with notepad++
and try save it on other charset (ansi or utf-8)

Wordpress : Write arabic text type in wordpress

I'm using the latest version of WordPress, when I try to write in Arabic any post it turns into u0644u0628u0627u0621u0644u0627u0621u0641u0628
I've googled the subject and I found out about the character encoding in both the DB and WP, i have to set both of them to the correct value, in DB = utf8-general-ci and in WP UTF-8 and I thought the problem should be resolved but no it's still not, so if anyone can help.
Open the website and view source, check the meta tag for Content-Type, is it set to utf-8?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
if not utf-8, fix it in the theme header.php file.

Meta tag not in first 1024 bytes

Caveat: Before someone goes and marks this as duplicate of this, please understand that it is not. The accepted answer is exactly what I am doing, yet I am facing the following issue.
HTML file in client folder looks like this:
<head>
<meta charset="utf-8"/>
<title>blah-blah</title>
---
The message I am getting in the firebug console is:
The character encoding declaration of the HTML document
was not found when prescanning the first 1024 bytes of
the file. When viewed in a differently-configured browser,
this page will reload automatically. The encoding
declaration needs to be moved to be within the first
1024 bytes of the file.
When I do a view source, between the head and the meta charset element, I see a whole bunch of link stylesheet and script tags.
If I remove the meta charset, I get this in the firebug console:
The character encoding of the HTML document was not
declared. The document will render with garbled text
in some browser configurations if the document
contains characters from outside the US-ASCII range.
The character encoding of the page must to be declared
in the document or in the transfer protocol.
How do I get the meta charset tag to appear right after the head?
What I did was edit /usr/lib/meteor/app/lib/app.html.in, and add the meta charset line so that the file now looks like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/> //**Added this line**
{{#each stylesheets}} <link rel="stylesheet" href="{{this}}">
{{/each}}
...
And of course I removed the meta charset line from my html files.
I think right now, this would be the way to go and this will be resolved in future revisions.
I had the problem in IE to force to use the latest version.
I had to add
<meta http-equiv="x-ua-compatible" content="IE=edge">
Directly behind the tag. And app.html.in seems not to be used anymore.
So I did this on tools/latest/tools/bundler.js
Line 783
'<head><meta http-equiv="x-ua-compatible" content="IE=edge">\n');
That forced it to add it in the html boilerplate.

Duplicate <meta> in Drupal variable $head

I am trying to customize the $head variable in my page.tpl.php template, because there are two instances of
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
appearing, which I believe is affecting the site from being validated using W3C's Markup Validation Service. Any help would be much appreciated, thanks!
Well, first of all I'd try and figure out WHY you're getting duplicates of that. Manually removing one is more of a hack than a fix.
That said, you can customize $head using template_preprocess_page. In your theme's template.php, do something like:
<?php
function THEMENAME_preprocess_page(&$variables) {
// use $variables['head'] here and do whatever you want with it, such as...
$variables['head'] = str_replace('blah blah','blah',$variables['head']);
// ...although that's completely untested and might not work
}
This seems to be a bug in the Drupal API, the discussion can be followed here:
http://drupal.org/node/451304#comment-2632954
Seems that even drupal.org is duplicating the content type meta tag.

Resources