Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 4.x > Installation and deployment > How to set culture to en-GB for CMSDesk View modes: 
User avatar
Member
Member
steve200309-hotmail - 3/6/2009 6:32:43 AM
   
How to set culture to en-GB for CMSDesk
I've set Kentico CMS to use en-GB culture, but dates in CMS Desk (eg the Created date of a document) still show as month:day:year rather than day:month:year I would like.

This is what I've tried so far:

In web.config:
<globalization requestEncoding="utf-8" responseEncoding="utf-8"
culture="en-GB" uiCulture="en-GB"/>

In CMS Site Manager:
In Sites Menu:
On the General Tab:
Default Content Culture & Default Visitor Culture both = "English - United Kingdom"

On the Cultures Tab:
Only English - United Kingdom is checked

For the login I am using (administrator) have set:
Preferred content culture: English - United Kingdom
Preferred user interface culture: English

If a look at the properties of a particular document in the document tree, it shows:
Culture: English-United Kingdom
but still shows created & modified dates in US format

Can you please tell me what else I can try?

Thank you

Using Kentico V4.0
My browser set to use en-GB only

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 3/9/2009 11:18:05 AM
   
RE:How to set culture to en-GB for CMSDesk
Hello,

Please try to follow steps bellow:

1) Please open 'Site Manager -> Development -> UI Cultures' section first. Click 'New UI Culture' and insert following values:

UI culture name: British English
UI culture code: en-GB

Click OK to save changes.

2) Please open 'CMSDesk -> Administration -> Users -> edit the user account you are using to access CMSDesk' section and change 'Preferred user interface culture' to 'British English' (you can make the same setting in 'CMSDesk -> My Desk -> My Profile' section).

Best Regards,

Martin Dobsicek

User avatar
Member
Member
Steve-Appetere - 3/11/2009 8:40:50 AM
   
RE:How to set culture to en-GB for CMSDesk
Thank you. This sorted the problem.

One further question:

Is there a way to make the default 'Preferred user interface culture' (the newly created) British English? Or do you have to set it manually for each user of CMSDesk & SiteManager?

One observation about Kentico terminology:

In ASP.NET culture terms have very specific definitions:
"Culture" are all the settings like dates, and must be a specific culture like en-GB
"UICulture" determines which language resources (translation) will be used.

In Kentico what you call the 'Preferred user interface culture' is therefore actually the ASP.NET "Culture" and (I assume) what Kentico calls the "Content Culture" is ASP.NET's "UICulture".

Might be worth using the ASP.NET terms in a future release for clarity, as Kentico's terms are essentially completly opposite to ASP.NETs?

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 3/17/2009 4:08:16 AM
   
RE:How to set culture to en-GB for CMSDesk
Hi Steve,

Please try to add following setting into /configuration/appSettings section in your web.config: <add key="CMSDefaultUICulture" value="en-gb"/>

Regarding the terms, they are independent of ASP.NET terms, just accidentally using the same name. Basically UICulture specifies culture used in administration interface (SiteManager/CMSDesk), while ContentCulture specifies culture of (content on) the actual live site.

Kind Regards,

User avatar
Member
Member
Steve-Appetere - 3/17/2009 9:09:30 AM
   
RE:How to set culture to en-GB for CMSDesk
Adding <add key="CMSDefaultUICulture" value="en-gb"/> to web.config did not work, on its own (all the labels in SiteManager changed to their "Name" in CMS.resx, so instead of "Settings", I would get "header.settings").

I then copied CMSResources/CMS.resx to CMS.en-gb.resx, restarted the application, and the labels were back to normal.

Can you help with a couple of further questions please:

1. Was my approach of creating CMS.en-gb.resx correct/necessary? Or is there a way to configure Kentico CMS so that it will use CMS.resx, if the specific resource file is missing (which would appear to be what happens when using the default en-US, since there is no CMS.en-us.resx file)?

2. Why do 43 keys for translatable descriptions appear both in [SiteManager -> Development -> UI Cultures -> en-US] AND 'CMSResources/CMS.resx'? If you change the version in UI Cultures, it doesn't change the .resx file. So why are there two versions?

Thanks for the help.

User avatar
Member
Member
Steve-Appetere - 3/17/2009 9:37:39 AM
   
RE:How to set culture to en-GB for CMSDesk
I have a question 3. to add to the previous post:

In addition to:
<add key="CMSDefaultUICulture" value="en-gb"/>

there is also an option to add:
<add key="UICulture" value="en-us"/>

What does this do? Just seems similar to the other key.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 3/17/2009 10:46:04 AM
   
RE:How to set culture to en-GB for CMSDesk
Hello,

Please see this article it could help you to understand the system of cultures:
http://devnet.kentico.com/docs/devguide/international_support.htm

1. I was not able to reproduce the issue – I created the new UI culture en-gb and all resource strings are taken from en-US. What version of Kentico are you using?
If you see the priority the strings should be taken from cms.resx if there is not a translation in the Site Manager or custom resource file.

2. They are the most common strings so that you could re-write them without accessing the source files. You could add any string you want to re-write there. The article explains the priority.

UICulture key is because of backward compatibility.

Best regards,
Helena Grulichova


User avatar
Member
Member
Steve-Appetere - 3/17/2009 1:10:20 PM
   
RE:How to set culture to en-GB for CMSDesk
Thanks for the reply Helena. I've just reproduced the problem where codes are displayed in labels, rather than the labels themselves, using a fresh Corporate Site ASPX demo in Kentico CMS V4.0. I've written down the steps I took exactly, but you can probably miss out some & still get the same effect.

I deliberately did not create a CMS.en-gb.resx file this time, to try & use the default text.

1. SiteManager -> Development -> UICultures, add en-GB culture

2. web.config -> appSettings, <add key="CMSDefaultUICulture" value="en-GB"/>

3. SiteManager -> Administration -> Users -> user "administrator" ->Preferred user interface culture = “(default)”

4. SiteManager -> Administration -> System -> Restart application

LABELS SHOWN CORRECTLY, BUT DATES STILL SHOW IN USA FORMAT

5. SiteManager -> Administration -> Users -> user "administrator" ->Preferred user interface culture = “English (United Kingdom)”

6. Log out (signout) & log back in as "administrator"

LABELS SHOWN CORRECTLY, BUT DATES STILL SHOW IN USA FORMAT

7. Close the browser (I'm using Visual Studio). Then use the "View In Browser" option to restart Kentico CMS again.

8. Login to SiteManager as "administrator"

LABELS ARE NOW SHOWN AS CODES LIKE "Header.Settings", BUT DATES ARE IN CORRECT UK FORMAT

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 3/18/2009 5:02:57 AM
   
RE:How to set culture to en-GB for CMSDesk
Hi Steve,

could you please try these steps once again?

(1. SiteManager -> Development -> UICultures, add en-GB culture)

(2. web.config -> appSettings, <add key="CMSDefaultUICulture" value="en-GB"/>)

3. SiteManager -> Administration -> Users -> user "administrator" ->Preferred user interface culture = “English (United Kingdom)”

4. SiteManager -> Administration -> System -> Restart application

6. Log out (signout)

7. Delete browser cache and cookies. Please check there are no cookies for your domain. Or you could also change the browser.

8. Log back in as "administrator".

This approach works on my machine (dates are in gb format and strings are displayed correctly). Could you please test it, too?

Best regards,
Helena Grulichova

User avatar
Member
Member
Steve-Appetere - 3/18/2009 6:20:27 AM
   
RE:How to set culture to en-GB for CMSDesk
I tried your suggestion, but the strings are still not displayed correctly.

I didn't repeat steps 1. & 2., but followed the rest.

I also tried creating another user, with administrator rights, & set the preferred UI culture to en-GB. When I logged in as that user, the same problem was there.

I did the test both with Firefox & IE7. It is easy to clear the cache & cookies in Firefox, so I'm sure that was done. In IE7, I found the kentico cookie, which did still reference the US culture, and deleted that.

There doesn't seem to be any reason why it shouldn't work now .. but it still doesn't! Any further ideas please?

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 3/18/2009 6:56:41 AM
   
RE:How to set culture to en-GB for CMSDesk
Hi Steve,

1. You could check the Firefox's cookie manager. You could find it in Options -> Privacy -> View Cookies. You are allowed to delete the cookies manually here, too.

User image

2. I would recommend you to check the Windows culture settings of date. You could find it in:
(Windows) Start -> Settings -> Control Panel -> Regional and Language Options -> select English (United Kingdom) -> check date formats

Best regards,
Helena Grulichova

User avatar
Member
Member
Steve-Appetere - 3/18/2009 7:43:19 AM
   
RE:How to set culture to en-GB for CMSDesk
I checked the "CMSPreferredUICulture" cookie & it shows "Content: en-GB".

My control panel settings are also all set to English (United Kingdom).

One clue that may help diagnose this:- if I remove " <add key="CMSDefaultUICulture" value="en-GB" /> " from web.config & simply refresh the browser, all the labels appear correctly. If I put the line back in web.config & refresh, the labels all immediately shows as their codenames.

Thanks for your continuing help,

Steve

User avatar
Member
Member
Steve-Appetere - 3/18/2009 8:12:02 AM
   
RE:How to set culture to en-GB for CMSDesk
Another clue for you:

If I set:

Site Manager -> Administration -> Users -> user = "administrator" -> Preferred user interface culture: (default)

with:

<add key="CMSDefaultUICulture" value="en-GB" /> in web.config

When I delete the UI Culture cookie, log out, log in again as administrator, the UI Culture cookie is now set to en-US

So the default value from web.config isn't being used.

User avatar
Member
Member
Steve-Appetere - 3/18/2009 9:36:22 AM
   
RE:How to set culture to en-GB for CMSDesk
To try & eliminate some variables, I decided to try a completely fresh install of Kentico CMS V4.0 on Vista Business. Following are all the steps I took. For me, the problem is completely reproduceable each time. Can you reproduce the problem by following these steps too?

1. Rebooted my Vista Business pc. All language settings are for en-GB, which I use for everything anyway.

2. Ran web installer program for Kentico 4.0, target directory "FreshCMS", for ASP.NET V3.5 & Visual Studio web server.

3. Created a new database called FreshCMS using SQL Server Management console

4. Opened the Solution file in Visual Studio & used "View In Browser" to open in IE7, and selected to use "FreshCMS" database

5 Entered free edition licence key for localhost (I have also tried a full, 30-day trial licence previously)

6 Selected "Blank Site ASPX" to setup

7 Logged into Site Manager as "administrator" when done

8 In Development -> UI Cultures, added en-GB

9 In Administration -> Users, set administrator's preferred user interface culture to en-GB

10 Signed out & back in to site as "administrator"

DATES SHOWN IN UK FORMAT. COULDN'T FIND A COOKIE FOR localhost IN IE7

11. Added <add key="CMSDefaultUICulture" value="en-GB" /> to web.config (which should cause an application restart, without getting Kentico CMS to do this).

12. Refreshed the browser

LABELS NOW SHOWN AS CODES

13. Opened FireFox browser

14. Deleted all "localhost" cookies. Cleared Cache. Closed browser.

15. Opened FireFox browser again

16. Logged in to Kentico as "administrator"

LABELS NOW SHOWN AS CODES

17. Checked FireFox cookies & UI Culture is set to en-GB


User avatar
Member
Member
JimS - 3/19/2009 3:57:36 AM
   
RE:How to set culture to en-GB for CMSDesk
Hi all,

I'm from Germany, quite new to KenticoCMS. Never tried to change UI sofar as not neccessary for my projects and anyhow I prefer to be in sync with docu ... ;-). Took this "opportunity" to check. Procedure/outcome as follows (using IE7 as default browser on XPSP3, K-CMS v4.0):

1. SiteManager -> Development -> UICultures, add en-GB culture

Done, but with "de-de". Not sure if I added that days ago or if it was there as default. Note: All entries are lowercase only, even en-us/cs-cz

2. web.config -> appSettings, <add key="CMSDefaultUICulture" value="en-GB"/>

Done, but with "de-DE" !_advocatus diaboli_!

3. SiteManager -> Administration -> Users -> user "administrator" ->Preferred user interface culture = “English (United Kingdom)”

Done, but "German"

4. SiteManager -> Administration -> System -> Restart application

Done

Step 5. was a copy of Step 3.

6. Log out (signout)

Done

7. ... Or you could also change the browser.

Done, opened in FF3

8. Log back in as "administrator".

Done

I have not created a german ressource file.

So, what have we got now:

- Dates are in an readable ;-) format like 19.03.2009. Fine, like that!

- I now also see ressource names like e.g "cms.avatar.description"/"general.users" in Administration panel and throughout tab titles etc.

- Now, if I change appSettings key to lowercase value "de-de" corresponding to Step 1 UICultures setting: --> all unknown (non de-de) strings are replaced correctly by en-us versions (e.g. Site Manager tab titles in german, Administration panel all in english.

Seems to be some "simple" typo conflict?

Just noted with UICulture = de-de: In Site Manager | Development there are now 2 tree nodes with the same label "Sprachgruppen" for "Cultures" and "UI Cultures". (Haven't checked throughout the app)

Best,
Jim

User avatar
Member
Member
Steve-Appetere - 3/19/2009 4:43:33 AM
   
RE:How to set culture to en-GB for CMSDesk
Jim, you've cracked it! As with you, I just had to change the web.config setting to "en-gb" in lower case and my labels returned to the default en-us strings.

I'd been carefully using "en-GB" as this is Microsoft's preferred format..

Many thanks for your post.

User avatar
Member
Member
JimS - 3/19/2009 4:48:24 AM
   
RE:How to set culture to en-GB for CMSDesk
Sorry, hadn't noticed that there was a page 2 prior to posting but guess my findings are still unique

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 3/19/2009 6:14:31 AM
   
RE:How to set culture to en-GB for CMSDesk
Hello guys,

I am happy you were able to find the exact problem.

We were able to reproduce the issue with 1. cases of cultures in web.config and 2. not working Preferred UI culture key in web.config.

Now, if you set the Preferred user interface culture: (default) it takes the culture from Site Manager -> Sites -> edit site -> Default content culture. The key from web.config is not applied.

We are inspecting these issues and they really seem to be bugs. Thank you for your help. We are sorry for your inconveniences.

Best regards,
Helena Grulichova