Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

ASP.NET Localization

  • 31-03-2010 10:19AM
    #1
    Registered Users, Registered Users 2 Posts: 165 ✭✭


    Hello All,

    I am in the process of Localizing our ASP.NET web application. For a start we will only localize to Chinese but more are likely to follow.

    I have the code part more or less sussed-
    Setting the Thread.CurrentThread.CurrentUICulture and Thread.CurrentThread.CurrentCulture,
    Creating Global/Local resource files,
    etc.

    My problem lies with the database. For a start I have ensured that all our fields are unicode- nvarchar, nchar, etc.
    But, from reading around I saw that the collation needs to be correct for ordering.

    Our database uses the 'Latin1_General_CI_AS' collation. Now, I presume that this won't order Chinese characters in the same way.

    I have done numerous searches and found nothing to fix this problem from SQL. But I found that you can order according to culture with LINQ ( http://stackoverflow.com/questions/1846215/how-do-i-get-linq-to-order-according-to-culture )
    	var result = fruits.OrderBy(f => f, StringComparer.CurrentCulture);
    
    Will this alone fill my needs or have I missed something regarding collations?


Comments

Advertisement