internationalization

Cookies vs Language Detection (Browser vs Location) vs None of both in multilingual websites

I have a dilemma with the following scenarios: Dilemma No.1 Cookies: Its good for users who access the website from his/her personal computer (no need to select preferred language again), but what happens if a language was fist selected in a public PC (e.g library) by someone, then it doesn't make too much sense because someone else w...

Translate standardButton in QDialogButtonBox

hi. i am using pyqt and designer. i have translated all the strings in my app with self.tr() + pylupdate4 and lrelease here is the snippet of code in my main(): app = QtGui.QApplication(sys.argv) app.setApplicationName('Mental Calculation') # initialize locale and load translation files if available locale = QtCore.QLocale() LOCALENAM...

How to redirect users based on browser language

I want to redirect users based on browser language, I figured out how to do this here, it works fine, here is the code(PHP): if(preg_match('/en-US/', $_SERVER['HTTP_USER_AGENT'])) header("location:index.php"); else header("location:http://cn.gearor.com"); The problem is I only want to redirect users from other websites or at t...

JDialog window controls component orientation (right-to-left)

Hi I have a question about mirroring the JDialog window controls (ie the close sign 'X', the title and so on) When I apply the right-to-left component orientation for a JDialog, it flips everything within apart from the window controls. I initially thought this is to do with the JRE I was using and the operating system regional languag...

What is the difference between C and Posix locales on Postgres?

I know that database locales on Postgres are responsible for proper order of national characters, proper lower/upper-casing etc. But why there are two language-neutral locales: posix and c? Is there any difference between them or is it just one neutral locale with two different names? UPDATE As Magnus Hagander states in his answer, POS...

Does IRC support internationalized room names?

Does IRC support internationalized (UTF-8) room names? How? A pointer to documentation or a spec would be welcome. ...

How to get TimeZone.getDisplayName(locale) value to return non-English text?

The code below outputs "Japan Standard Time". TimeZone tz = TimeZone.getTimeZone("Asia/Tokyo"); Locale locale = new Locale("ja_JP"); System.out.println(tz.getDisplayName(locale)); I am expecting it to output something with Kanji along the lines of "日本標準時". It does not seem to matter what timezone ID or locale I pass to getDisplayNam...

ROR: Localised Message String Variable Substitution

I am trying to work out the best way to replace multiple variables/placeholders within localized message string in my ruby on rails application. When replacing a single placeholder I have used the satisfactory: In en.yml: url_borked: "The URL: $url could not be loaded." In view: t(:url_borked)["$url"] = request.url But this is ...

Python: Access Posix' locale database without setlocale()

The setup is a Django based website on an Ubuntu server system with lots of useful information in /usr/share/i18n/locales. The question: Can I access this pool of wisdom without using Python's locale.setlocale() afore? The reason: The docs say, that it is very expensive to call setlocale(), and affects the whole application. But in...

django modeltranslation registers "0" models

I have a Django project that employs modeltranslation. On the development box, it registers 10 models and works flawlessly. On the production server, when started it notifies that it has registered "0" models (instead of 10) and doesn't throw any exceptions. However when any admin page that shows a should-be-registered model is visited...

ASP.NET localization of text with embedded link...and the link is a server control

I'm working on internationalizing and localizing an ASP.NET app, and I'm running into problems with cases where string literals are mixed with markup. Like this example: Acme Carpet Retailers <a href="#" class="link" id="ssoLoginUrl" runat="server">click here</a> to log into the site. For most string literals I'm using the Local...

Which computer assisted translation format should I use for a ColdFusion site?

I am creating a multilingual site that will need to support at minimum five different languages, including Korean and Chinese. The site language is ColdFusion, so Java is the native language. I want to make the site as easy as possible for the next programmer to update, and for third-party translators to use tools that will work easier f...

Is ResourceBundle fallback resolution broken in Resin3x?

Given the following ResourceBundle properties files: messages.properties messages_en.properties messages_es.properties messages_{some locale}.properties Note: messages.properties contains all the messages for the default locale. messages_en.properties is really empty - it's just there for correctness. messages_en.properties will fall...

Python: Get system calendar format

Is it possible to return the current system calendar format using Python? For example non-Gregorian calendar formats such as the Thai Buddhist calendar. ...

Arguments in the middle of a string to be localized

Hello, I'm a beginner in Python. My problem is pretty simple. I have a string to be localized in a python application containing parameters : print _('Hello dear user, your name is ') + params['first_name'] + ' ' + params['last_name'] + _(' and blah blah blah') This actually does the job, but is not really what I would call a nice wa...

Can regular expressions work with different languages?

English, of course, is a no-brainer for regex because that's what it was originally developed in/for: Can regular expressions understand this character set? French gets into some accented characters which I'm unsure how to match against - i.e. are è and e both considered word characters by regex? Les expressions régulières peuv...

Where is the correct place to do culture-specific date/currency formatting for asp.net mvc views?

Given a domain object: class BirthdayDomain { public DateTime Birthday { get; set; } public decimal BirthdayPresent { get; set; } } I have two options for passing this to a strongly-typed view: 1. class BirthdayView { public DateTime Birthday { get; set; } public decimal BirthdayPresent { get; set; } } and in the...

pybabel or other l10n libraries for PHP

Babel or pybabel is an interface to the CLDR (Common Locale Data Repository) in Python. As such, it has the same 'knowledge' as PHP's i18n functions and classes (if the appropriate locales are installed on the host), but without the hassle of using process-wide settings like setlocale(). Is there a similar library or toolkit for PHP? Es...

Does BiDi support need to extend to visualizations?

I'm in the process of writing a visualization library for a product I work on and I've been thinking about i18n and BiDi support. I haven't been able to find a good answer anywhere, and my Project Manager doesn't really know the answer either. My question is this: how far should I take bi-directionality with visualizations? Should the...

Confusion on Unicode and Multibyte Articles

By referring Joel's Article Some people are under the misconception that Unicode is simply a 16-bit code where each character takes 16 bits and therefore there are 65,536 possible characters. This is not, actually, correct. After reading the whole article, my point is that, if someone told you, his text is in unicode, yo...