When looking at the urls listed on a random page's properties pane, the url looks right, but the page doesnt display on the url... i simply get an error
What we normally do is create a parent node called "languageswitch", where we have an ascx macro that checks the visitors browser language and then redirects to site.com/en or site.com/dk depening on their browser locale.
The language specific nodes are below a "languageswitch page" in my case, and it works like a charm.
An old formpost about this:
What we do is create a
"variationroot" documenttype/masterpage, that contains only a macro that
holds a usercontrol that checks the language of the visitors browser
settings and redirects the user to the subsite of his preferred language
var defaultLanguage =System.Configuration.ConfigurationSettings.AppSettings["DefaultLanguageRedirect"]; if(!String.IsNullOrEmpty(defaultLanguage)) { Response.Redirect(defaultLanguage); } Response.Redirect("/nl"); }
</script>
The code above also checks if a cookie exists with a user language
choice, should he be a returning visitor, it's possible to save the
language preference of the visitor should he prefer a different language
as his browser preference. This does require additional code for the "
language switch" button that you use.
In the content section, we create this structure:
Where we set the locale for the NL and FR pages. All other content is
created below these pages (except mayby a custom 404 error, and
googlesitemap.xml file for SEO)
For the NL and FR (and other languages) i also set the locale using the "manage hostnames" menu in the context menu of the page:
Detail of the hostname configuration for the dutch version of the website:
The benifit of setting the language this way, is that you can start
using dictionary items in your templates and xslt files etc, I also
recommend creating a dictionary item "language" with the short keys
"en;fr;nl;" in them, so you can test against these columns in xslt in
choice statements, to run different queries depening on language
language version as subdirectory
im sure this is really simple, but i cant get it to work...
i have two language versions of my site.
Each version resides as a root node.
I want the main site to have the base url www.mysite.com
i want the alternative language version to have the base url www.mysite.dk/dk
I have added www.mysite.com and www.mysite.com/dk as hostnames to the two sites.
When looking at the urls listed on a random page's properties pane, the url looks right, but the page doesnt display on the url... i simply get an error
Am i missing a setting somewhere?
Hi Claushing,
Have you tryed republishing the nodes?
Regards,
Eduardo
What we normally do is create a parent node called "languageswitch", where we have an ascx macro that checks the visitors browser language and then redirects to site.com/en or site.com/dk depening on their browser locale.
The language specific nodes are below a "languageswitch page" in my case, and it works like a charm.
An old formpost about this:
What we do is create a "variationroot" documenttype/masterpage, that contains only a macro that holds a usercontrol that checks the language of the visitors browser settings and redirects the user to the subsite of his preferred language
Variationroot.master:
languageredirectcontrol.ascx:
The code above also checks if a cookie exists with a user language choice, should he be a returning visitor, it's possible to save the language preference of the visitor should he prefer a different language as his browser preference. This does require additional code for the " language switch" button that you use.
In the content section, we create this structure:
Where we set the locale for the NL and FR pages. All other content is created below these pages (except mayby a custom 404 error, and googlesitemap.xml file for SEO)
For the NL and FR (and other languages) i also set the locale using the "manage hostnames" menu in the context menu of the page:
Detail of the hostname configuration for the dutch version of the website:
The benifit of setting the language this way, is that you can start using dictionary items in your templates and xslt files etc, I also recommend creating a dictionary item "language" with the short keys "en;fr;nl;" in them, so you can test against these columns in xslt in choice statements, to run different queries depening on language
I have tried this, and I got to the part where I was send to the right url umbraco.test/da
My problem is if I call http://umbraco.test/da.aspx I get the content shown which I was expecting, but if I call http://umbraco.test/da I get a 404 error.
If I look under properties on the folder da, I see Alternative link, http://umbraco.test/da can anybody point me to what im doing wrong?
In your web.config, update:
Thanks for the reply, but it did not fix the problem, I still get 404 error with the settings set to true.
Im using IIS7, I do not know if that can make a difference.
change the application pool mode to integrated
Read the information on this page:
http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/
I think you need to add wildcard script mapping to be able to load the extentionless url's.
Hey Rik
Thanks it worked when I enabled integrated mode on the app pool.
Make sure that if your content is available under multiple domainnames/url's that you use link/canonical tag: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
is working on a reply...