English 中文(简体)
Sitecore set/change default language from en
原标题:
  • 时间:2009-11-10 00:55:15
  •  标签:
  • sitecore

Can anyone recommend the best way to change the default language in Sitecore 6.1. On a fresh install, the typical language for all items is en English, witha nice little USA flag and all.

However, we are setting up a system which is targeting en-AU and en-NZ. When I rename the main en language item in any database, every other item is left without a version in the "correct" language. I recall in the past that renaming this item causes an update across the whole system, but that didn t seem to be the case when I tried it today.

Is there an easy "Sitecore" way to convert all default items to the primary language en-AU? I ve considered running a sql update script over the database, but am hoping there is a neater way of doing it.

最佳回答

I don t think that changing anything about the en-language is a good idea. A lot of internal Sitecore objects are based on that language and you could risk loosing labels and help texts in the Sitecore UI.

We usually create all templates, renderings and layouts in the en-language and then create the content items for each language.

Instead you should set the language property in web.config for your site.

Here is an example that we are using from one of our multi-language solutions:

<site name="website_no" hostName="www.site.no|site.no" language="no" />
<site name="website_en" hostName="www.site.com|site.com" language="en" />
<site name="website" language="sv" />

The last line catches all requests not caught by the two first ones.

问题回答

Couldn t get a site to use Danish as default language for backend UI based on value language="da" in <site...> tag. Changed it to da-DK, which made it work. Don t know if this is expected behaviour, but one might use the fully qualified ISO code to make sure, things are good.





相关问题
How do I hook the Save event in Sitecore Page Editor?

I m creating a custom edit control for my content authors to use in the Page Editor. Of course this means I want my control to save data to an Item when the user clicks on the Save button. How is ...

Passing Parameters to a Sitecore Sublayout

I ve done this before with a web control, but I can t seem to get it to work with a sublayout. On the Presentation Details for a particular item I m assigning my Sublayout and then in the additional ...

Lucene.Net Search List

I m using Sitecore and have a multilist field I d like to use Lucene to search on. The problem I have is that the field is a pipe-delimited list of actual values and there could be between 0 and an ...

Test for Descendant Items

I am trying to create a simple inventory of items in a Sitecore website using an xslt. The problem is that I can t find a way to test whether an item has descendant items beneath it. It s easy to ...

Sitecore set/change default language from en

Can anyone recommend the best way to change the default language in Sitecore 6.1. On a fresh install, the typical language for all items is en English, witha nice little USA flag and all. However, ...

热门标签