internationalization

Is it possible to generate a global list of marked strings at compile time/runtime?

烈酒焚心 提交于 2019-12-06 08:38:23
So, I'm working on translating my C++ app into multiple languages. What I'm currently using is something like: #define TR(x) (lookupTranslatedString( currentLocale(), x )) wcout << TR(L"This phrase is in English") << endl; The translations are from a CSV file which maps the english string to the translated string. "This phrase is in English","Nasa Tagalog itong pagsabi" This is simplified, but that's the basic idea. My question is about generating the list of English phrases that need to be translated. I just need the CSV with all the english phrases, and blank translated phrases. I was hoping

File name corruption on file download (IE)

不想你离开。 提交于 2019-12-06 08:28:59
问题 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

Localization of Text File resources in .NET

回眸只為那壹抹淺笑 提交于 2019-12-06 08:22:32
问题 Localization/Globalization is pretty easy in Visual Studio using RESX files. I just add a resource file, like MyTextSnippets.resx , add key/value pairs, and create copies for every language I'd like to support like MyTextSnippets.de.resx , MyTextSnippets.fr.resx etc. Now think of longer texts, where the String resource editor grid doesn't work very well. No problem, just choose "Add Resource | Add New Text File" from the designer, and you can edit as many text files as you want. Example: I

ResourceBundle [messages] not found for MessageSource: Can't find bundle for base name messages

孤人 提交于 2019-12-06 08:07:14
In applicationContext.xml I have defined MessageSource like this: <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basenames"> <list> <value>/WEB-INF/i18n/messages</value> </list> </property> </bean> I also need to load all the localized messages so I have made my own class for it: public class ErpMessageSource extends ResourceBundleMessageSource { public Map<String, String> getMessages(String basename, Locale locale) { Set<String> keys = getKeys(basename, locale); Map<String, String> m = new HashMap<String, String>();

Automatically translate web page

妖精的绣舞 提交于 2019-12-06 08:03:38
How can I automatically translate my web page when I entered it. This is my translator there is connected to my dropdown. <script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'da', includedLanguages: 'da,de,el,en,es,fi,fr,it,ja,ko,nl,no,pl,ru,sv,uk,zh-CN,zh-TW', layout: google.translate.TranslateElement.FloatPosition.TOP_LEFT, gaTrack: true, gaId: 'UA-32978177-1'}, 'google_translate_element'); } </script> <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"> <

Image localization in asp.net

拜拜、爱过 提交于 2019-12-06 08:00:39
I have a web application which needs to support multiple languages. We currently have quite a lot of images on the site with text in them. Im trying to find a way to localize these images with the least amount of hassle. What i have come up with so far is to add sub folders to the current /Images folder which relate to the required language. So for example /Images contains the default set of images and /Images/es-MX contains the Spanish-Mexican localised images. All pretty standard so far i think. Now the issue i have is that in order for this new structure to work i need to add the following

How to use django.views.i18n.set_language() function?

╄→尐↘猪︶ㄣ 提交于 2019-12-06 07:48:40
问题 I read a tutorial in Django site but I don't understand how to use the set_language() function. For example, I have a demo follow as: index.html {% trans "Hello World." %} <form action="/i18n/setlang/" method="post"> {% csrf_token %} <input name="next" type="hidden" value="/next/page/" /> <select name="language"> {% get_language_info_list for LANGUAGES as languages %} {% for language in languages %} <option value="{{ language.code }}">{{ language.name_local }} ({{ language.code}})</option> {%

Qt Installer Framework: Translate component description

扶醉桌前 提交于 2019-12-06 07:38:13
问题 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<

Grails i18n UrlMappings

自作多情 提交于 2019-12-06 07:29:45
I am dealing with the following problem. In our project we have launched different internationalized domains for the same website. The problem comes with the UrlMappings for the different languages. for example: English: name contact: "/contact"(controller: 'static', action: 'index') { id = '/contact' } German: name deContact: "/kontakt"(controller: 'static', action: 'index') { id = '/contact' } repeating all the code again and again. Is there a solution to group both url mappings to use the same controller, action and logic ? for example it would be nice to have something similar like this:

WiX: How to automatically include localized satellite assemblies?

落花浮王杯 提交于 2019-12-06 07:26:27
问题 Can WiX be set to automatically include all generated satellite assemblies? The goal is to have a single English language MSI that installs an application with localized strings available for ~10 languages. I found this existing SO quetsion: How do I include Satellite Assemblies(Localized Resources) in an MSI built with WiX? However that solution suggests that new component and directory definitions needs to be manually added for each culture variant. Is that the only way, or can WiX somehow