@antegtvn : My solution places the default language of your site at the root. So http://www.superior-extensions.com/ gives you the home page for default languege, http://www.superior-extensions.com/fr/ is the home page for french.
To do that, in SEOHelper, I updated this function :
public static string GetHomeUrl()
{
return CommonHelper.GetStoreLocation() + /* update here */ GetLocaleSubFolder();
}
I call it each time I need a link to the homepage.
As I said in previous post, on thing is missing : I am not actually able to change dynamicly the language using locale subfolder. Example : if you choose english, then you add /fr/ in the url, you still are in english...
The solution could be in url rewriting process. We can change regex in urlrewriting.config to transform /fr/ in a parameter like lang=fr like this :
<add name="LocProductDetailsRewrite" virtualUrl="^~/([\w-]*)/products/([0-9]*)-([\w-]*)\.aspx(?:\?(.*))?"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/product.aspx?lang=$1&productid=$2&$4"
ignoreCase="true" />
Then need to find the best place in code to analyse this parameter and change the NopContext.Current.WorkingLanguage. Perhaps this place is WorkingLanguage (get) property itself.