internationalization

Can xgettext be used to extract specific domain strings only?

(Really surprised this isn't answered anywhere online; couple posts over the past few years with a similar question, but never answered. Let's hope the Stackoverflow crew can come to the rescue) Situation: When using gettext to support application localization, one sometimes wishes to specify a 'domain' with dgettext('domain', 'some t...

Which option is more scalable?

I'm working on php, mysql on a project I'm planning to add a multilanguage option, usually I use single textfile for each php file, but I want to know if one of the followings is good or not and why. Using one single textfile for the whole site: This would make my life peacefully because I have to make changes in one place only, but I...

How to make ghost fields in Doctrine?

Hello. I have such a model Designer: tableName: designers actAs: I18n: fields: [name] columns: id: type: integer(2) unsigned: true primary: true autoincrement: true name: type: string(30) notnull: true While default I18n behavior must be used like this $d = Doctrine_Query::c...

How i get the current language in django?

How i can get the current language of my web in a model or in the admin? ...

How to implement search on a gettext driven multi language site?

I'm setting up a multi-language using gettext. Since all text from other languages are in the compiled .mo files. How should I attack the search function of the site? Any help or point of direction would be appreciated. Note, I have not coded a search enigine before… ...

Drupal's Aggresive or External-mode Caching and the i18n Module

If you're not a native English speaker doing Drupal, then the i18n module is probably the only way. This is why it seems very strange to me that the performance admin page says that i18n might not work with aggressive caching or (in the case of PressFlow) external-mode caching. I find it hard to believe that multilingual drupal sites sc...

Layout direction for Arabic is not determined based on the locale (Mac and Linux)

Has anyone managed to have the correct layout direction (left-to-right and right-to-left) be inferred from the user’s language settings? I am having trouble localizing my application to the Arabic (Saudi Arabia) locale. Detection of the current locale, and loading and installing the appropriate QTranslators both work fine. (The text loo...

Rails ActiveRecord date parsing for i18n (specifically european date formats).

I'm working on a rails project for an Australian website. As a result, they want to be able to enter date formats in the more european-standard of 'dd/mm/yyyy' rather than the US-centric 'mm/dd/yyyy'. I have an ActiveRecord model with a Date field. I'm using jQuery's datepicker to provide the date select on a text field, and have it s...

Does the spiders indexing your website (google bot...) have a "culture" ?

Hello, This is a SEO question : i've the choice to display a page's title according to the culture of the visitor. If it's an english : <title> <?php if ($sf_user->getCulture() == 'en') : ?> Hello, this is an english website <?php else ?> Bonjour, ceci est un site français <?php endif ?> </title> Does the bots/spid...

Exclude attribute name prepending in error message

I have a simple internationalization: attributes: user: login: Login errors: template: header: "Errors" body: "" models: user: attributes: login: taken: "The chosen {{attribute}} is already registered" The resulting error message is as follows: Login The chosen Login is already registere...

Localization Strategy

We're currently debating two strategies of localization: A. Have an XML file for the structure of the business objects with a Localized key to a separate CSV file for the translation. for eg. /Resources/Schema.xml in a separate CSV file: we have all key/value pairs for the translations: /Resources/Localized.txt Model_Title, Title...

Program-wide parameters in Java.

Hi. I started to work in translating a Java program which has tens of dialog classes to deal with. I wonder how is it possible to create a parameter that is understood in all of those classes, without having to declare it in each one. Actualy are two parameters. Tried with something like: public Locale currentLocale = new Locale("en");...

How to deal with javascript internationalization in yii framework

Is there any mechanism in yii framework to translate messages in javascript source files. For example with: yiic message config-message.php I can generate translation .php files for all Yii::t(). Is it possible to generate .js files with the same mechanism. Currently I'm including to my javascript json data with table returned by tr...

java.util.MissingResourceException: Can't find bundle for base name.

I'm testing Java's i18n features and have a problem, can't load the language file when its not in the class root. Right now my files are in the /lang directory. Looked several answers here in SO, putting it in a "classes" subdir and loading it like "lang.Messages", used complete location routing "/Test/lang/Message" (test is the project...

Use google translate to translate printf-based string

I'm trying to use the web-based google translate to translate my english files to another language. They contains characters like %s and %d. Is there a way to protect them from being erroneously translated. For instance, the text: Athlete already exists with number %s is translated to: Athlète existe déjà avec nombre% s whil...

How to dynamically pass arguments to messages in the resource bundle

I would like to retrieve the message information from the i18n bundle (messages.properties in seam), but I am not sure how to pass the declare / pass the jobCount variable dynamically in my xhtml The existing code looks like this. <s:decorate template="/layout/panel-name.xhtml"> <ui:define name="label">User has been assigned #{jobC...

How to provide the javadoc in other languages?

We frequently integrate with services developed and maintained in other countries like Spain, Chile, India etc. I see consitently that the services/API calls from Spain and Chile are in Spanish. But we want our code to be English and Javadoc to be both in English and Spanish. I am seeking the best way to achieve this. Is there a common...

Best way to represent Spain address in java.

I have coded the below to represent addresses in Spain. Let me know if there are better ways of doing this or if there is already a open source library dealing with i18n addresses. /** * From <a href="http://www.addressdoctor.com/en/countries_data/sampleaddress.asp?code=ESP%2BSpain}"&gt;Address doctor</a> * <p> * Format * </p> * ...

How to make PoEdit correctly parse custom "ngettext" implementation?

I've coded a gettext wrapper that makes the whole process of l10n a little bit simpler but somehow I can't get PoEdit to correctly identify and parse plural version calls to the function. This is what I originally had: _e(array('%d house', '%d houses'), 5); But that doesn't work at all, PoEdit picks nothing at all. I also tried: _e('...

International characters in filename in mutipart formdata

I am using Apache HTTP components (4.1-alpha2) to upload a files to dropbox. This is done using multipart form data. What is the correct way to encode filenames in in a multipart form that contain international (non-ascii) characters? If I use there standard API, the server returns an HTTP status Forbidden. If I modify the upload code s...