Last post Feb 16, 2010 05:06 AM by tronix01
Feb 09, 2010 08:40 AM|tronix01|LINK
actually i've developed a asp.net 2.0 multilanguage website by using localization incl. resource files.
now i've got a problem with the following question:
how can search engines detect my multilanguage website-content ?
can they detect the resource-files ?
thanks for any help
SEarch Engine Optimization localization
asp.NET 2.0 C#
Feb 09, 2010 09:18 AM|icecape67|LINK
search engines are not going to read your resource files, but you can set the language of the page through meta tags like:
<META HTTP-EQUIV="Content-Language" CONTENT="en-US">
Feb 10, 2010 05:54 AM|tronix01|LINK
thanks for your reply.
that's all ? only add meta tags to my master-page and that's it ?
i guess i need url-rewriting to deligate the search engine crawler to the french content by separeted url like www.mysite.com/fr/site.aspx
do i ?
thanks for help
Localization automatic asp:Localize RESX resource
asp.NET 2.0 C#
localisation mulltilanguage html controls
Feb 10, 2010 07:17 AM|icecape67|LINK
that will help as well, or to a different subdomain like "fr.mysite.com". Make sure that the content for all languages is crawlable, dont rely on redirects or cloacking to do it or you may get a penalty
Feb 10, 2010 11:58 AM|DavideDarko|LINK
This is very interesting for me as I am in the same situation
I don't use query string parameters but Session and a cookie to store the user's language. At the moment my website is in three different languages, sharing the same pages (ad example ~/Default.aspx) and using global/local resources.
How can I base my url rewriting on the culture selected by the user?
This is the code that I use for the localization (without url rewriting)
public class BaseClass : Page
protected override void InitializeCulture()
//retrieve culture information from session
string culture = Convert.ToString(Session[Global.SESSION_KEY_CULTURE]);
//check whether a culture is stored in the session
if (culture.Length > 0)
Culture = culture;
//check if the culture is in a cookie
else if (Request.Cookies["CulturePref"] != null)
culture = Request.Cookies["CulturePref"].Value;
else culture = Global.DEFAULT_CULTURE;
//set culture to current thread
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(culture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
//call base class
Feb 10, 2010 02:16 PM|tronix01|LINK
hello at all
thanks for replay
that's the same way like i do :)
override InitializeCulture, use session and cookies.
so i have the same question like DavideDarko.
how can i make my mulitlanguage ressources visible for the search engine crawlers, when all my pages in the same folder and each page share two (fr and en) resource-files ?
thanks for any help
Feb 11, 2010 12:38 AM|DavideDarko|LINK
I think I have solved it.
I have used urlrewriter.net http://urlrewriter.net/
And specified the following rules in the web.config
<rewrite url="~/en/(.*)" to="~/$1.aspx"/>
<rewrite url="~/sv/(.*)" to="~/$1.aspx"/>
<rewrite url="~/it/(.*)" to="~/$1.aspx"/>
Of course you can be more specific, using other rules.
Let me know if it's working for you
Feb 11, 2010 04:53 AM|icecape67|LINK
if you use session/cookies and leave the urls the same for all languages you are going to get just 1 page indexed regardless of the language that it's written in. It's important to have different urls for each language so all those pages get indexed
Feb 11, 2010 09:35 AM|tronix01|LINK
thx for replay
urlrewriting seems to be a good way but how do you delegate the domain like
www.mysite.com/en/default.aspx so that the urlrewrites can start ?
i imaging the workflow in case of a request to the website like that, isn't it ?
1. request www.mysite.com/default.aspx
2. detect language of requester (does this work for search engines also ???)
3. in case of redirecter language = en, redirect to
4. rewrite url from www.mysite.com/en/default.aspx to
load the en lanuage from the resource file to the default.aspx
i 'm not sure about all of that, so i hope you or anybody else can bring me some clearness
thanks a lot
Feb 11, 2010 09:46 AM|tronix01|LINK
i know you are right!
But that's excactly my problem. I know that i need different urls to get indexed the different language-pages.
If i would start to seperate (and duplicate) my pages in two folders (en and fr), i don't need to use resource files at all.
And i also won't develop dummypages which one only redirects to the content-page.
seems to be difficult :)
thanks for help
Feb 11, 2010 10:59 PM|DavideDarko|LINK
I've started to look into url rewriting recently and I'm still doing testing, so it would be great if someone else with more experience can confirm or not my explanation below.
Google should show only pages like mysite.com/en/default.aspx mysite.com/fr/default aspx and so on. If someone from outside write in the url bar something like www.mysite.com, you are going (in your code) to redirect him to the proper language path and then
he will keep browsing on that path unless he changes the language.
You are not redirecting people. You are showing outside your website to be www.mydomain.com/en/*** regardless your internal page structure.
Again, not sure if I'm right, but that's what I understood from all the code example I read out there.
Feb 12, 2010 04:55 AM|icecape67|LINK
DavideDarko is right.
You use the url rewritting to expose your pages as distinct urls for each language, then you set the thead language and load only one page with the localized resources.
You have got a method on the Page class which you can override called InitializeCulture(), that runs before the page load. Suppose your rewritter converts "/articles/es/1414-article-name.html" to "/article.aspx?id=1414&lang=es", you use the InitializeCulture()
on the article page to set the executing thread culture to "es" and that will get the content of the "es" resource file
Feb 12, 2010 12:14 PM|tronix01|LINK
i got a solution for my problems.
1. expose my pages with urlrewriting
from www.mysite.com/fr/default.aspx to
2. load css, themes, images when url needs to be rewritten (http://weblogs.asp.net/fmarguerie/archive/2006/01/11/435022.aspx)
but at least i want some more :)
do you know how can i solve the following problem ?
if someone enters www.mysite.com and the browser language is french, so it should be redirect or rewrite the url to
but rewrite www.mysite.com/fr/default.aspx also to the url rewritten path like
load the resource depends to the language.
i want that everbody can see that the url contains /fr/ when he uses a french browser language.
i hope someone does understand my task
thanks for any help
Feb 12, 2010 05:00 PM|icecape67|LINK
have you tried checking if the request path is for the "Default.aspx" page the redirecting the use for the browser accept-language of browser?
Feb 13, 2010 02:54 PM|tronix01|LINK
i'm not sure if i understand you.
so could you please tell me again what you mean or may be can you give me an example ?
thanks a lot again
Feb 16, 2010 05:06 AM|tronix01|LINK