localization

Find a localized file

Hi In my asp.net app a user can upload several localized images (of buttons) . For example, he will upload 'send.gif', 'send.fr.gif', 'send.en-UK,gif; etc.. When a visitor is coming to his page, I need to pick up the right file based on the visitor's locale. Is there an api (or simple way) to find the best appropriate image based on...

Remove elusive keyboard binding in visual studio

Ever since I installed the free edition of devexpress backslash (Alt Gr++ on my swedish keybaord) is bound to expand selection. While that feature is useful I still prefer backslash when I am to choose between the two. When I check Tools | Options | Environment | Keybaord I can't find the shortcut anywhere and I can re-bind the shortcut...

Apache beehive and localizing default pager for DataGrid

I am trying to localize strings created by Apache Beehive and netui default pager. I'd like to translate language of this output. Page 1 of 3 First / Previous Next / Last My .jsp code looks something like this <netui-data:dataGrid name="searchResultsGrid" dataSource="pageInput.someData"> <netui-data:header> ... </net...

Convert wide character strings to boost dates

I need to convert several million dates stored as wide strings into boost dates The following code works. However, it generates a horrible compiler warning and does not seem efficient. Is there a better way? #include "boost/date_time/gregorian/gregorian.hpp" using namespace boost::gregorian; #include <string> using namespace std; ...

Localize Images in ASP.NET

A couple of years ago, we had a graphic designer revamp our website. His results looked great, but he unfortunately introduced a new unsupported font by the web browser. At first I was like, "What!?!"... since most of our content is dynamic and there was no real way to pre-make all of the images. There was also the issue of multiple la...

Reimplementing ToUpper()

How would you write ToUpper() if it didn't exist? Bonus points for i18n and L10n Curiosity sparked by this: http://thedailywtf.com/Articles/The-Long-Way-toUpper.aspx ...

How can I use GNU gettext with VB6?

I've been using gettext in several private projects and now I want to use gettext to translate strings of a Visual Basic 6 application. I've checked the GNU gettext packages and it seems that I have to write quite some boilerplate code to get it working with VB6 and I fear that my boss won't allow it. Is there some out-of-the box pa...

Shared localization for asp.net, javascript and silverlight?

How do you localize ASP.NET + javascript + Silverlight? I would like to be able to include the same texts in different languages in asp.net pages, javascript on the page, and Silverlight objects on the page. I have tried with the following method, but have no experience with it in practice, and I would like to hear your opinions on it ...

Asp:TextBox and VNI-Times, Vietnamese Text Problem

I need to be able to allow a user to enter Vietnamese text into a text box. I have been instructed to use VNI-Times and provided a sample word document with Vietnamese text. When I paste the text from the sample document into the textbox it is encoded incorrectly. I have tried installing the font (VNI-Times) on both my machine and the ...

How can I translate the validation messages of Struts 2?

I want to learn how to use Struts 2 and I created a simple application following a tutorial I found. I've created a <MyActionClass>-validation.xml file and I wonder how can I translate the validation messages to multiple languages? <field name="password"> <field-validator type="requiredstring"> <param name="trim">true</param> <...

Making an expandable button in HTML

I need to make OK and Cancel buttons in my HTML, and I'd like them to be a fixed width so the two buttons are the same size. For example, like this: <style> button.ok_cancel { width: 50px; background-color: #4274af; font-size: 9px; line-height: 12px; color: #fff; cursor: pointer; text-transform: uppercase; ...

How to use same database and same program for two different locales in .NET

I have a C# program which uses a SQL Server database.I am already using it in a country that uses . as decimal separator. Now I want to use it in another country that uses , as decimal separator. in C# is there some application level setting that I can change or write some code so that I can use the same database and the same program ?...

Flex Localization: refresh DataProvider values

I have a ToggleButtonBar with a DataProvider setup like this: <mx:ToggleButtonBar itemClick="clickHandler(event);" selectedIndex="0"> <mx:dataProvider> <mx:String>{resourceManager.getString('dashboard','daily')}</mx:String> <mx:String>{resourceManager.getString('dashboard','monthly')}</mx:String> <mx:String>{resour...

Localization in Visual Studio 2008

I am trying to localize a desktop app (C#) in VS2008. I have mastered localizing the forms for multiple languages and I also have a project resource file for general strings but I cannot fathom out how to create multiple language versions of this file! It doesn't seem to be documented anywhere. The consequence seems to be that if I ...

How to figure out which timezone a (ASP.NET / MonoRail) website user is in?

So, I'm setting a cookie that should expire. However, I want this to work around the world. So I need to adjust my expiry date for the user's timezone. So, I need to find out the user's timezone, server-side. Is there a way to do this in the BCL? As in, something like relying on the CultureInfo.CurrentUICulture to be set correctly...

Localization of DisplayNameAttribute

Hi, I am looking for a way to localize properties names displayed in a PropertyGrid. The property's name may be "overriden" using the DisplayNameAttribute attribute. Unfortunately attributes can not have non constant expressions. So I can not use strongly typed resources such as: class Foo { [DisplayAttribute(Resources.MyPropertyNa...

How can I use the URL to set the current culture in ASP.NET 2.0 Web App?

Hi, I am looking in to ways to enable a site to basically have something like: http://mysite.com/en-US/index.aspx` Where the "en-US" can vary by culture.. This culture in the URL will then basically set the CurrentUICulture for the application.. Basically, we currently have a page where the user explicitly clicks it, but some are fa...

How to get the FxCop custom dictionary to work?

How is it possible to get the FxCop custom dictionary to work correctly? I have tried adding words to be recognised to the file 'CustomDictionary.xml', which is kept in the same folder as the FxCop project file. This does not seem to work, as I still get the 'Identifiers should be spelled correctly' FxCop message, even after reloading ...

Ignoring accented letters in string comparison

I need to compare 2 strings in C# and treat accented letters the same as non-accented letters. For example: string s1 = "hello"; string s2 = "héllo"; s1.Equals(s2, StringComparison.InvariantCultureIgnoreCase); s1.Equals(s2, StringComparison.OrdinalIgnoreCase); These 2 strings need to be the same (as far as my application is concerned...

Localizing system generated status messages

Hello, I am working in a .NET environment where the system occasionally generates log entries for a customer. Messages are then appended to a customer log which can be reviewed at a later time. For example, if a customer is subscribing to a new service, or a customer has a failed payment attempt, these messages gets appended to the cus...