SEO and multilingual pages

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 лет назад
Hello, I have a question about the multilingual drop down list... how does it work with the robots of the search engine? I'm now well listed in google with the original version of my website (italian). But I want to be indexed in english too and seems that google doesn't read pages in english. Maybe is better to have a link in the mainpage with the parameters for english language?
14 лет назад
You're right. Thanks for suggestion!
14 лет назад
Hello. Sorry for bothering You; I'm now implementing my idea on my website; how can i place the link for the engish language? Maybe is better to have a "fake english default page"? Or maybe is better do it with the urlrewrite to have something like www.mystore.com/en/default.aspx and www.mystore.com/it/default.aspx ?
14 лет назад
It's better to do it with the urlrewrite (www.mystore.com/en/default.aspx and www.mystore.com/it/default.aspx)
13 лет назад
I thought that IP was localized! When I bought my ip I was able to choose witch country was concerned.

So is it a good idea to have all languages behind the same IP?

Perhaps it would be better to have one ip for default language
www.mysite.com

And one ip for each other language
fr.mysite.com
it.mysite.com

If someone have more information I am interested...
Thanks
13 лет назад
nopCommerce team | a.m. wrote:
It's better to do it with the urlrewrite (www.mystore.com/en/default.aspx and www.mystore.com/it/default.aspx)


I am having the same problem: Very good ratings in Greek, non-existent in English. Could you please let me know how could I implement this urlrewrite function? What do I have to change in the standard urlrewrite (Configuration/Global Settings/SEO-Display) method? I am using nopcommerce v1.60.
13 лет назад
I have also the same problem but I see that even after few months you did not answer how to solve this problem and implement solutions.

My idea is that for the default language are the links with no extension in url link like:

https://www.nopcommerce.com/default.aspx

and for other languages like italian

https://www.nopcommerce.com/it/default.aspx

Can you, please finally tell as how to implement and create this?

One more idea:

You have the problem with flags on your site, because when you cross over them with mouse you do not see where is that link going, because they created by ajax technology, but it would be better for SEO if they are ordinary links, like when I cross over the mouse, I see the link in that language.
13 лет назад
I am using a personal solution on http://www.superior-extensions.com/, but I had to change many thing :

First part : update you code.

In Nop.BusinessLogic.SEO.SEOHelper I have added this :


        private static Language defaultLanguage = null;
        public static Language DefaultLanguage
        {
            get
            {
                if (defaultLanguage == null)
                {
                    defaultLanguage = NopSolutions.NopCommerce.BusinessLogic.Directory.LanguageManager.GetAllLanguages(false)[0];
                }
                return defaultLanguage;
            }
        }

        private static string ExtractLocaleSubFolderFromCulture(string culture)
        {
            bool locFolderUseLanguage = true; //You can set to false to use country par of the culture
            if (locFolderUseLanguage)
            {
                //in fr-CA, uses fr
                return culture.Substring(0, culture.IndexOf('-'));
            }
            else
            {
                //in fr-CA, uses CA
                return culture.Substring(culture.IndexOf('-') + 1);
            }
        }

        public static string GetLocaleSubFolder()
        {
            if (NopContext.Current != null && NopContext.Current.WorkingLanguage != null)
            {
                if (NopContext.Current.WorkingLanguage.LanguageId != DefaultLanguage.LanguageId)
                {
                    string locFolder = ExtractLocaleSubFolderFromCulture(NopContext.Current.WorkingLanguage.LanguageCulture);
                    return locFolder + "/";
                }
                else
                    return "";
            }
            else
                return "";
        }


This code helps you to build the needed part (/us/, /de/, /fr/ etc...) that you want to add to your urls. This new part is called localeSubFolder, and is empty for the default language of you site.
Remark : it is using a static field to improve perfs, so need an application restart if you change default language...

In each proc that gives you seo url, I added a call to GetLocaleSubFolder. Exemple with GetProductUrl :

        public static string GetProductUrl(Product product)
        {
            if (product == null)
                throw new ArgumentNullException("product");
            string seName = GetSEName(product.SEName);
            if (String.IsNullOrEmpty(seName))
            {
                seName = GetSEName(product.Name);
            }
            string url = string.Format(SettingManager.GetSettingValue("SEO.Product.UrlRewriteFormat"),
                CommonHelper.GetStoreLocation() + /* added here */ GetLocaleSubFolder(), product.ProductId, seName);
            return url.ToLowerInvariant();

        }

You should do the same for each proc GetXXXUrl


Second part : update url rewrite
You should also update the file UrlRewriting.config to add new rules, because new urls contains another / and regex will not recognize you url.
for example add a new rule for localized products, juste to add /[\w-]*/ in the regex :

    <add name="LocProductDetailsRewrite" virtualUrl="^~/[\w-]*/products/([0-9]*)-([\w-]*)\.aspx(?:\?(.*))?"
         rewriteUrlParameter="ExcludeFromClientQueryString"
         destinationUrl="~/product.aspx?productid=$1&amp;$3"
         ignoreCase="true" />


Last part : tell search engines what are your goals.
Google allows you to tell explicitly which country is concerned by which subfolder. Go to the webmaster tools, validate you site and each subfolder, then Site configuration -> Settings -> Geographic target

This solution is not perfect :
If you manually change url in the browser to add /en/ it does not change the current language.
We could change the static field into a cached value, use settings to store locFolderUseLanguage value...
13 лет назад
Thanks @nicolas.muniere.

If I don found my self a better solution, i will implement yours.

My solution include that i have two UrlRewriting.config files, one fore default language, and one for other languages.

And that is where I stack. I do not know from where NopCommerce starts to read UrlRewriting.config, I mean from which class?
13 лет назад
I believe that UrlRewriting.config is read by UrlRewritingNet.UrlRewriter library directly...
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.