internationalization

Django multi-language (i18n) and SEO

I am developing a multi-language site in Django. In order to improve SEO, I will give every language version a unique URL like below, english: www.foo.com/en/index.html french: www.foo.com/fr/index.html chinese: www.foo.com/zh/index.html However, Django looks for a "django_language" key in user's session or cookie to determine lang...

MySQL charset conversion

Hello, I have a database in which all text fields and tables have 'utf8' specified explicitly as default character set, however data in this database is stored as 'cp1257'. I can display symbols only when I use SET NAMES 'cp1257' or \C cp1257. Trying to display them without those instructions fails, because it tries to fetch data as 'utf...

Rails application and multilingual content, Model dilemma

I'm writing in Rails a website that will be multilingual, for the application translation part i will use the simple I18n gem, for messages and everything related. Yet, all the content must be translated, and we're talking about lots of pages, that will be stored into the database ( like articles, news, etc. ) For now, I'm thinking of ...

Django form and i18n

I have forms that I want to display in different languages : I used the label parameter to set a parameter, and used ugettext() on the labels : agreed_tos = forms.BooleanField(label=ugettext('I agree to the terms of service and to the privacy policy.')) But when I am rendering the form in my template, using {{form.as_p}} The labe...

Django's check_for_language always returns False

I have compiled Indonesian locale's .PO file into .MO file and installed it correctly with other locales. The problem is all other locales is working but when I tried to switch to id locale, get_language() always return "en". Any ideas about the reason? ...

Four byte encoding of U+00F6 (LATIN SMALL LETTER O WITH DIAERESIS)?

Which character encoding (or combinations of encodings) represents the character ö (U+00F6, LATIN SMALL LETTER O WITH DIAERESIS or simply put chr(246) in ISO-8859-1) as the four octets combination chr(195) . chr(63) . chr(194) . chr(164)? ...

Rails: Internationalization of Javascript Strings?

So, we have an existing Rails 2.3.5 app that does not support Internationalization at all. Now, I'm well familiar with Rails I8n stuff, but we have a LOT of output strings inside /javascripts/. I'm not a huge fan of this approach, but unfortunately it is too late to fix it now. How might we internationalize strings stored in JS files in...

How do I use IIS6 style metabase paths in IIS7 AppCmd tool?

I'm currently in the process of upgrading old II6 automation scripts that use the IISVdir tool to create/modify/update apps and virtual directories, and replacing them with AppCmd for IIS7. The IIS6, "IISVDir" commands reference paths in that are from the metabase, eg, /W3SVC/1/ROOT/MyApp - where 1 is ID of "Default Web Site". The comma...

Unicode filenames on windows in ruby

I have a piece of code that looks like this: Dir.new(path).each do |entry| puts entry end The problem comes when I have a file named こんにちは世界.txt in the directory that I list. On a Windows 7 machine I get the output: ???????.txt From googling around, properly reading this filename on windows seems to be an impossible task. Any s...

Write a GreaseMonkey script that reacts to domain strings (for I18N, e.g. cn,en,fr,etc.)

Hello. Suppose there is a website that supports multiple languages: cn.mydomain.com or mydomain.com/cn or mydomain.cn en.mydomain.com or mydomain.com/en or mydomain.com fr.mydomain.com or mydomain.com/fr or mydomain.fr I want to write a GreaseMonkey script that has variables assigned different strings/values according to the address ...

Spring internalisation

English properties file can be read bt when i click on french link it couldnt read.Can u tell me the stepwise process to do this.I hav images which need to be in french when i click in french.. ...

Django's makemessages creates a lot of fuzzy entries

Each time I added some strings to a Django project, I run "django-admin.py makemessages -all" to generate .PO files for all locales. The problem is even I only added 5 news strings, the makemessages command will mark 50 strings as fuzzy in .PO files which brings a lot of extra work for our locale maintainers. This also makes the entire...

Internationalization using Tiles

Hi everyone I want to implement internationalization in tiles. I have made 3 definition files-layout-defs_en.xml,layout-defs_fr.xml and layout-defs.xml. By default it is going with the layout-defs_en.xml definition file. I want to know how will it switch the tiles definition files. I got to know a session attribute Locale, by which it ...

Add a drupal translation based on a already setup language?

I have a site translated for a number of countries. Now I need to add a country but the language is already in the system (f.e. they speak French in both Belgium and France, or German in Germany and Austria). So instead of adding an extra language I'd like to have an url prefix for my new country but it needs to use both content and int...

Why whould I need to maintain the url like "en.some.com|| fr.some.com" ?

What are the benefits to maintain the nice urls for multi lingual sites? I understand that it has to do something with SEO, but what exactly? ...

Develop web-services aware of user's time zone

I'm developing a client-server application on java. The server offers some operations through a web service. The application must show some content depending on the user's custom date and time; information that is retrieved from the web service. Different users may be in different time zones. I've been thinking on how to store on the se...

Python encoding ISO to UTF8

Hello everyone, I am trying to read my emails using a Python script (Python 2.5 and PyPy) Some of my results are not in ASCII and i get strings like this: =?ISO-8859-7?B?0OXm7/Dv8d/hIPP07+0gyuno4enx/u3h?=' Is there any way to decode it and convert to utf-8 so that i can process it? I tried .decode('ISO-8859-7') but i got the same s...

The jsf2 h:outputText tag is not formating the h:outputText with the MessageFormat

The jsf2 h:outputText tag is not formating the h:outputText with the MessageFormat my faces config <application> <resource-bundle> <base-name>Messages_pt_BR</base-name> <var>bundle</var> </resource-bundle> </application> My resource bundle: ... EventPageTitle=Event: {0} ... My JSF2 XHTML: <h:outputText val...

django customizing form labels

I have a problem in customizing labels in a Django form This is the form code in file contact_form.py: from django import forms class ContactForm(forms.Form): def __init__(self, subject_label="Subject", message_label="Message", email_label="Your email", cc_myself_label="Cc myself", *args, **kwargs): super(ContactForm, self...

How to change validation messages on forms

Hi, the website I'm developing will be in spanish. Therefore, I'll need the error messages in that language. I created a file under Configuration directory called 'en.yml' in order to accomplish this. And I added the following code in it: es: activerecord: errors: models: announcement: attributes: ...