0

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 .

enter image description here

neda Derakhshesh
  • 1,103
  • 2
  • 20
  • 43
  • You probably not setting the locale correctly https://stackoverflow.com/a/1561583/3254405 – boateng Sep 11 '18 at 13:55
  • If you have 16 languages it may be good idea to add “manual” translate option with Google translate widget https://nationbuilder.com/google_translate_widget – boateng Sep 11 '18 at 13:59
  • @numbtongue thank you very much for your care, then do you think that my question needs to be update with my maproute codes ? – neda Derakhshesh Sep 11 '18 at 14:02
  • May be it can help, but I think it would be great if you can provide a screenshot of the issue.. Because it seems now the issue is with SEO.. – boateng Sep 11 '18 at 14:42
  • @numbtongue I edited the controllers but the problem still exist. please look at the screen shot which I have attached . I really appreciate any kind of help. thank you – neda Derakhshesh Sep 12 '18 at 09:55
  • Have you checked your browser setting for 'preferred language'. It might be 'english'. – Poul Bak Sep 12 '18 at 10:43
  • @PoulBak I have checked in different browsers. still the same – neda Derakhshesh Sep 12 '18 at 10:58
  • That text coming from meta title and meta description tags, you have to populate them on each page with different language.. Google also caches the results so you have to wait or force it to recrawl your site.. – boateng Sep 12 '18 at 13:33
  • @numbtongue thank you very very much. I recrawl once but no changes , but I think its better to wait a little bit for some changes. I will let you know the result. any way thank you very very much – neda Derakhshesh Sep 16 '18 at 09:34

0 Answers0