I have implemented a multi language website with Asp.net MVC. it has 16 different pages for 16 different languages. I have written different description for each page with the help of using Viewbag.
the problem is that in non EN
pages like FR
, google preferred english texts in page to show in the description of the page site . even the english sentences which I have used by mistake in alt attributes of my images. google prefers those english ones. it seems it does not understand that the language of my page is fr.
I define lang attribute for html tag like this
<html lang="@ViewBag.lang">
and also I have meta tag to define language too
<meta name="language" content="@ViewBag.lang">
and I have this codes at the beginning of each pages
@{
ViewBag.Title = "some french text";
ViewBag.ActiveMenu = "French";
ViewBag.desc = "some text in french language ";
ViewBag.lang= "fr";
ViewBag.Key=" some texts";
}
when I Inspect my page it seems that everything is fine and fr is in the html attribute and also in meta lang tag.
what could be the problem? I really appreciate any help. thank you .
here is what I have in my html tag in inspect report
<html lang="fr" style="" class=" js flexbox canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths">
and this is meta tag for language
<meta name="language" content="fr">
the google result look like this .