Hi folks! Having some problems on a site with multi-domains. If the visitor is accessing http://www.site-name.com/en/ and clicks on a menuitem/link on the page, he will be redirected to http://site-name.com/en/node-name/ ; instead of the www in the beginning of the URL.
I've been adding the domains in the "manage domains" on the languagenode correctly and I also made a republish of the whole Content-node.
unfortunately this don't work because "manage domains" isn't meant to be this way. This only works if you have different root level domains for your web server (e.g. www.my-site.com and www.my-site.de both pointing to the same IP address and web server and you have your server set up for both domain names correctly). BTW This my error on start with umbraco too, the whole theme is a little bit confusing. If you use path extentions for language selection you must remove your "manage domains" settings and manage the language distinction manually or by writing XSLT macros which take care about that. This is the way I do it with my little web site http://www.ucc-bln.de . It is still not perfect bilingual (AutoForm macro is only in german) but neverless I'm quite proud on it ;-)
Search the forum, there are plenty of tips for this problem, also in the old umbraco.org books section.
Just to clarify a bit. When using "Manage domains" on a multilingual site, you also get to set the culture for the specific node. This way when you are fetching dictionaryitems formatting dates etc you get the correct word/format.
If you move away from them you need to handle the cultures manually via a usercontrol or something, am I right?
Hi Patrik, yes that's the point: Dictionary items only work "out of the box" when you go the "Manage domains" way.
Ok I try to explain my solution with subfolders and macro logic. My Site structure is:
Content | +- ucc-bln | +- en <- doctype: Blog Home/Frontpage | | | +- ... | +- de <- doctype: Blog Home/Frontpage | +- ...
Then I use a Python macro with SetUiLanguage.py (which could be rewritten in C# too with no problems I assume)
The macro alias is SetUiLanguage
# using Xml clr.AddReference('System.Xml') from System.Xml import * from System.Xml.XPath import * from System.Threading import * from System.Globalization import *
# The fun starts here -->
# create the xpath iterator by current node iterator = umbraco.library.GetXmlNodeCurrent() # get the culture info name form root node data 'cultureInfoName' iterator = iterator.Current.Select("ancestor-or-self::node[@level=2]/data[@alias='cultureInfoName']") iterator.MoveNext() culture = iterator.Current.Value
# set the culture info Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(culture); Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
The Blog Frontpage master template uses this macro like this:
<head profile="http://gmpg.org/xfn/11"> <!-- Set Ui Culture Info --> <umbraco:Macro Alias="SetUiLanguage" runat="server" />
The Blog Frontpage DocumentType must have a Tab "Language" with two Textstring properties: language and cultureInfoName
for german Blog Frontpage document it is set to: language deutsch; cultureInfoName de-DE for english Blog Frontpage document it is set to: language english ; cultureInfoName en-US
www in URL being removed while clicking links
Hi folks!
Having some problems on a site with multi-domains. If the visitor is accessing http://www.site-name.com/en/ and clicks on a menuitem/link on the page, he will be redirected to http://site-name.com/en/node-name/ ; instead of the www in the beginning of the URL.
I've been adding the domains in the "manage domains" on the languagenode correctly and I also made a republish of the whole Content-node.
Any ideas how to make this work on the site?
Regards
Patrik
Hi Patrik,
unfortunately this don't work because "manage domains" isn't meant to be this way. This only works if you have different root level domains for your web server (e.g. www.my-site.com and www.my-site.de both pointing to the same IP address and web server and you have your server set up for both domain names correctly). BTW This my error on start with umbraco too, the whole theme is a little bit confusing. If you use path extentions for language selection you must remove your "manage domains" settings and manage the language distinction manually or by writing XSLT macros which take care about that. This is the way I do it with my little web site http://www.ucc-bln.de . It is still not perfect bilingual (AutoForm macro is only in german) but neverless I'm quite proud on it ;-)
Search the forum, there are plenty of tips for this problem, also in the old umbraco.org books section.
HTH, Immo
Just to clarify a bit. When using "Manage domains" on a multilingual site, you also get to set the culture for the specific node. This way when you are fetching dictionaryitems formatting dates etc you get the correct word/format.
If you move away from them you need to handle the cultures manually via a usercontrol or something, am I right?
Post your solution here when you solve it Patrik.
Hi Patrik, yes that's the point: Dictionary items only work "out of the box" when you go the "Manage domains" way.
Ok I try to explain my solution with subfolders and macro logic. My Site structure is:
Then I use a Python macro with SetUiLanguage.py (which could be rewritten in C# too with no problems I assume)
The macro alias is SetUiLanguage
The Blog Frontpage master template uses this macro like this:
The Blog Frontpage DocumentType must have a Tab "Language" with two Textstring properties: language and cultureInfoName
for german Blog Frontpage document it is set to: language deutsch; cultureInfoName de-DE
for english Blog Frontpage document it is set to: language english ; cultureInfoName en-US
With this logic you can use the dictionary items.
HTH, Immo
is working on a reply...