Upgrade 0.9 to 1.2.231 - Dates in US and not UK format

Topics: Customizing BugNET, Installing BugNET, Localization
Dec 12, 2012 at 8:25 AM
Edited Dec 12, 2012 at 8:25 AM

Hi All

Been using 0.9 for some time without any real major issues, upgraded to 1.2 and the dates have gone back to US format.  When I installed 0.9 I had to change the WEB.CONFIG to change the CULTURE in the GLOBALIZATION tag to en-GB and that worked.

In the upgraded version the CULTURE is still set to en-GB, but it shows as US format date instead of UK.  Any ideas?

Steve

 

part of the web.config file below:

   <globalization culture="en-GB" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8"/>
        <httpRuntime maxRequestLength="4000" executionTimeout="1000"/>
    </system.web>

Developer
Dec 12, 2012 at 5:18 PM

What is the default preference for the user you are logged in as?  This takes preference now over the config of the site.

Dec 13, 2012 at 9:14 AM

Hello

The default is en-US, but in the dropdown you can't pick English(English) which would result in en-GB and put the dates right I would assume.  Do you think I need to download a UK translation pack?  Or something else, if so where do I get it?

Thank you

Steven

Developer
Dec 13, 2012 at 2:07 PM

You can add the language to the Languages table using the SQL (you will have to manually run this against the BugNET database using the SQL Server management studio).

INSERT INTO [dbo].[BugNet_Languages] ([CultureCode], [CultureName], [FallbackCulture])
VALUES('en-GB', 'English (United Kingdom)', 'en-US')

Then select that for your user.  ASP.NET does not need the en-GB resource files as it will default to the en-US version.  However all the formats for currency, dates and numeric should be honored by the UI.

Coordinator
Dec 13, 2012 at 8:09 PM

Alternatively, if you just want to force one culture for all users you can comment out the localization module in the web.config and set the globalization tag like you did above.

Dec 14, 2012 at 2:10 PM
wrhighfield wrote:

You can add the language to the Languages table using the SQL (you will have to manually run this against the BugNET database using the SQL Server management studio).

INSERT INTO [dbo].[BugNet_Languages] ([CultureCode], [CultureName], [FallbackCulture])
VALUES('en-GB', 'English (United Kingdom)', 'en-US')

Then select that for your user.  ASP.NET does not need the en-GB resource files as it will default to the en-US version.  However all the formats for currency, dates and numeric should be honored by the UI.

Hello

Thanks for the fix, I didn't realise that the user preference overrode the setting in the web.config

Great result.

 

Steve

Apr 11, 2013 at 12:28 PM
You might also want to search and change the following line in web.config for the Profile Manager so new users get created correctly:
<add name="PreferredLocale" type="String" defaultValue="en-GB" customProviderData="PreferredLocale;nvarchar;50" />
Regards, Andrew.
Aug 27, 2013 at 7:41 PM
Is there a way to have string in English and date formatted in Italian.
Ideally I want my users to be able to use Italian strings and italian date formatting while keeping for me the English string with the Italian formatting.

Thank you.