internationalization

Language switching in TYPO3 v6

六眼飞鱼酱① 提交于 2019-12-04 16:33:57
Switching the fontend-language does not work for me as expected. What I have done so far: At the root page, I created two website-languages, german and english: In the typoscript template I added the following setup, I found most of this scattered around the web: config { tx_realurl_enable = 1 simulateStaticDocuments = 0 sys_language_uid = 0 language = de locale_all = de_DE htmlTag_langKey = de linkVars := addToList(L) uniqueLinkVars = 1 sys_language_mode = content_fallback sys_language_overlay = 1 } [globalVar = GP:L = 0] config.sys_language_uid = 0 config.language = de config.locale_all = de

Django 1.2.3 - Internationalization - makemessages does not detect all strings

拥有回忆 提交于 2019-12-04 16:09:55
One more question about Django concerning localization of javascript files. Django provides a small and convenient javascript library which is used like gettext to internationalize strings in javascript files. I set it up successfully (at least the interpolate function works) and I could generate the po file for the French language. However, not all strings are detected. I don't really know why because they all look the same. I couldn't find anything on the Django Trac and the official docs. The javascript code is in an external file included in the template and Django apparently found it

Finding the client's timezone and culture via web service

无人久伴 提交于 2019-12-04 15:50:37
I have a .NET web service. It serves AJAX requests from web users. I would simply like to know how to automatically get the user's timezone... Not current time offset, but the actual timezone - like, Central Standard Time is -5:00 right now, but Eastern Standard Time will be -5:00 once daylight savings is over. I want to differentiate these users. I would also like to know how to get their culture settings ("en-US", etc.) so I can render DateTimes and numbers from my web service to their specific preferences. Any Javascript or .NET solution will work. Thanks. Note: Asking the user would be a

Internationalization with python gae, babel and i18n. Can't output the correct string

倖福魔咒の 提交于 2019-12-04 15:46:01
jinja_env = jinja2.Environment(loader = jinja2.FileSystemLoader(template_dir),extensions=['jinja2.ext.i18n'], autoescape = True) jinja_env.install_gettext_translations(i18n) config['webapp2_extras.i18n'] = { 'translations_path': 'locale', 'template_path': 'views' } app = webapp2.WSGIApplication([ ('/', MainController.MainPageHandler) ], config=config, debug=True) In the messages.po file. "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2013-01-19 19:26+0800\n" "PO-Revision-Date: 2013-01-19 19:13+0800\n" "Last-Translator: FULL NAME \n"

Which ISO format should I use to store a user's language code?

ぃ、小莉子 提交于 2019-12-04 15:35:44
问题 Should I use ISO 639-1 (2-letter abbreviation) or ISO 639-2 (3 letter abbrv) to store a user's language code? Both are official standards, but which is the de facto standard in the development community? I think ISO 639-1 would be easier to remember, and is probably more popular for that reason, but thats just a guess. The site I'm building will have a separate site for the US, Brazil, Russia, China, & the UK. http://en.wikipedia.org/wiki/ISO_639 回答1: You should use IETF language tags because

Access translated i18n messages from Scala templates (Play! Internationalization)

孤街浪徒 提交于 2019-12-04 15:29:56
In my Play! 2.0 application I would like to define the following languages: # The application languages # ~~~~~ application.langs=en-GB,de-DE,nl-NL I also have created 3 files that ends with the corresponding language codes: Messages.en-GB Messages.de-DE Messages.nl-NL When I start the application without any request for a translated key I get the following error message: conf/application.conf: 12: Key 'de-DE' may not be followed by token: ',' (if you intended ',' to be part of the value for 'de-DE', try enclosing the value in double quotes) Also when trying to access a message from the Scala

I18n C++ hello world with plurals

偶尔善良 提交于 2019-12-04 15:12:16
Complete C++ i18n gettext() “hello world” example has C++ code that works for a simple fixed string. I am now looking for an example program that works with plurals. This example code displays six lines. Only one is correct in English. It does not handle the plurals correctly. cat >helloplurals.cxx <<EOF // hellopurals.cxx #include <libintl.h> #include <locale.h> #include <iostream> #include <stdio.h> int main (){ setlocale(LC_ALL, ""); bindtextdomain("helloplurals", "."); textdomain( "helloplurals"); for (int ii=0; ii<5; ii++) printf (gettext("Hello world with %d moon.\n"), ii); } EOF g++ -o

File name corruption on file download (IE)

不羁岁月 提交于 2019-12-04 15:00:56
I have implemented a simple file upload-download mechanism. When a user clicks a file name, the file is downloaded with these HTTP headers: HTTP/1.1 200 OK Date: Tue, 30 Sep 2008 14:00:39 GMT Server: Microsoft-IIS/6.0 Content-Disposition: attachment; filename=filename.doc; Content-Type: application/octet-stream Content-Length: 10754 I also support Japanese file names. In order to do that, I encode the file name with this java method: private String encodeFileName(String name) throws Exception{ String agent = request.getHeader("USER-AGENT"); if(agent != null && agent.indexOf("MSIE") != -1){ //

Qt Installer Framework: Translate component description

穿精又带淫゛_ 提交于 2019-12-04 14:47:05
I've got Qt Installer Framework QtIFW2.0.1 installed and I had a look at the shipped examples. When I had a closer look at the example translations I learned how I can translate the content of a custom ui file. But what I neither saw in the example nor in the documentation is how I can translate text that is located in the component package.xml file. In the above mentioned example this looks like this: <?xml version="1.0" encoding="UTF-8"?> <Package> <DisplayName>The root component</DisplayName> <Description>This component contains a license and translations to German.</Description> <Version>0

Arabic QueryString problem (???? in the value)

我与影子孤独终老i 提交于 2019-12-04 14:38:50
I am sending an arabic value in a querystring, when retrieving it on the server, the value is erroneous and is replaced by quotation marks (????). for example: http://server/mypage.aspx?qs=مرحبا the value of Request.QueryString("qs") is ????? Note that Response.Write('مرحبا') executes correctly. Any idea about this querystring problem? Thanks. Just URL Encode the arabic string and it should work fine. Edit: You must URL Encode the string before putting it in the querystring. For instance, if you were to url encode the space character, it will appear as %20 in your querystring, like this: http: