This project is read-only.

multilingual website

Dec 29, 2011 at 9:15 PM

Can we create one website with multiple languages?

default dutch

some content in english and some in spanish

Those would be only pages, no blog posts.


Thanks for helping me out!

Dec 30, 2011 at 11:47 AM

Yes, BlogEngine.NET outputs its pages in UTF-8 encoding which allows for basically any language.  You can have some blog posts/pages in one language, and other posts/pages in other languages.

There's also a Language setting on the Settings page in the control panel.  By default it's set to Auto which means that if you have visitors from different parts of the world, most of the "non-content" text will also automatically change to text that matches the language of the visitor.

Dec 30, 2011 at 11:57 AM

Ok, great!

That leaves one question: Can I make a lagnauge selection in my 'new page'? Given a selected language it should alter the template (xhtml):

<html xmlns="" xml:lang="en" lang="en">

Actually, it should change the whole template, since other items (menu items) will have to change.

Is this possible?

Dec 30, 2011 at 11:59 AM

Can I post pages to different folder?

i.e. or

Dec 31, 2011 at 12:04 PM

I think I misinterpreted what you are trying to do.  It sounds like you are trying to have the same Page (same content) in multiple languages.  A couple of possible methods come to mind.

Method #1
You could create 2 separate pages, one in English and one in French.  They wouldn't be in separate folders, but would have different page names.  For example:

Method #2
You could combine the English and French languages into the same page, with syntax something like this when you are composing your Page.

Bonjour .....

Hello .......

All of this text would be in the SAME Page.  And then an "Extension" could be created -- something similar to the existing "BreakPost" extension that would dynamically at runtime look at the language of the visitor, and based on that, it would choose the language in the Page, and filter out the other content.  So if the visitor is Dutch, it would extract the content in the [lang=fr] tag, and remove the rest of the content when it serves the content to the browser.  So "Bonjour ...." would appear.

In either case, you would need to decide how you are going to determine which language a visitor is shown.  Are you going to look at the "Request" object to see what languages the person/browser accepts to determine if they are an English or Dutch person?  Or maybe you'll use a different subdomain ( and

You could also use a different theme in addition to the above.  Themes can dynamically be set at runtime.  This post shows an example of how it's done.  So once you determine if the visitor is English or Dutch, you could dynamically change to a different theme.