multilingual

Visualisation of uft-8 (Polish) not working properly

ぐ巨炮叔叔 提交于 2020-01-22 00:37:25
问题 My software supports multiple languages (English, German, Polish, Russian, ...). For this reason I have some language specific files with the dialog texts in the specific language (Encoded as UTF-8). In my mfc application I open and read those files and insert the text into my AfxMessageBoxes and other UI-Windows. // Get the codepage number. 65001 = UTF-8 // In the real code this is a parameter in the function I call (just for clarification) LANGID languageID = 65001; TCHAR szCodepage[10];

Write JavaScript in Other Languages

我只是一个虾纸丫 提交于 2020-01-16 04:15:06
问题 I have some clients who are not English speaking. They would like the JavaScript I write for them to be in another language. Can browsers understand other languages, or am I limited to non-English comments? navigateur.nomApp.indice("Microsoft") Instead of : navigator.appName.indexOf("Microsoft") 回答1: You can get any object and assign it to a variable with a French name for instance var nomAppDeNavigateur = navigator.appName; Then use it wherever, it's just the keywords that are restricted to

Develop multilingual system

霸气de小男生 提交于 2020-01-15 08:24:40
问题 This is more of an analytical question. I need to know how best to make a multilingual system, a.k.a. a system where the user can change the language. The language will be stored in a cookie or a database. I've worked in the past with different files for each language, for example: nl.php $lang['hi'] = 'Hoi'; $lang['howareyou'] = 'Hoe gaat het?'; en.php $lang['hi'] = 'Hi']; $lang['howareyou'] = 'How are you?'; index.php include($language . '.php'); As you can see, this system is both

Develop multilingual system

随声附和 提交于 2020-01-15 08:24:11
问题 This is more of an analytical question. I need to know how best to make a multilingual system, a.k.a. a system where the user can change the language. The language will be stored in a cookie or a database. I've worked in the past with different files for each language, for example: nl.php $lang['hi'] = 'Hoi'; $lang['howareyou'] = 'Hoe gaat het?'; en.php $lang['hi'] = 'Hi']; $lang['howareyou'] = 'How are you?'; index.php include($language . '.php'); As you can see, this system is both

Indexing multilingual words in lucene

不想你离开。 提交于 2020-01-14 06:03:06
问题 I am trying to index in Lucene a field that could have RDF literal in different languages. Most of the approaches I have seen so far are: Use a single index, where each document has a field per each language it uses, or Use M indexes, M being the number of languages in the corpus. Lucene 2.9+ has a feature called Payload that allows to attach attributes to term. Is anyone use this mechanism to store language (or other attributes such as datatypes) information ? How is performance compared to

How can I achieve multi-lingual server errors in an ASP.NET application?

半城伤御伤魂 提交于 2020-01-13 13:49:54
问题 My ASP.NET web application has the following section in web.config: <system.webServer> <httpErrors errorMode="Custom"> <remove statusCode="500" subStatusCode="-1" /> ... <error statusCode="500" prefixLanguageFilePath="httpErrors\custom" path="500.htm" responseMode="File" /> ... </httpErrors> My application directory contains the following files: httpErrors\custom\en-US\500.htm httpErrors\custom\de-DE\500.htm These two files are identical except for their content language. I now add a simple

How can I achieve multi-lingual server errors in an ASP.NET application?

不问归期 提交于 2020-01-13 13:49:28
问题 My ASP.NET web application has the following section in web.config: <system.webServer> <httpErrors errorMode="Custom"> <remove statusCode="500" subStatusCode="-1" /> ... <error statusCode="500" prefixLanguageFilePath="httpErrors\custom" path="500.htm" responseMode="File" /> ... </httpErrors> My application directory contains the following files: httpErrors\custom\en-US\500.htm httpErrors\custom\de-DE\500.htm These two files are identical except for their content language. I now add a simple

Best practice in making Rails applications multilingual

佐手、 提交于 2020-01-13 08:10:09
问题 Hello everyone :D I've just started learning Rails and currently I have one concern. I am building a Rails web site which needs to be translated to 4 languages. What would be the most practical and convenient method to do it? I've read the main goal would be to make separate folders for each language and copy all the views for each language. But I would still have notice messages on English inside my controller so how would I handle that. Routes are also my concern. Should I have 4 different

Python Date Conversion. How to convert arabic date string into date or datetime object python

帅比萌擦擦* 提交于 2020-01-11 11:43:08
问题 I have to convert this date into normal date string/object. ١٩٩٤-٠٤-١١ to 11-04-1994. 回答1: I have made a solution to this problem. May be not a best but its working :) # -*- coding: utf8 -*- import unicodedata s = u"١٩٩٤-٠٤-١١" def date_conv(unicode_arabic_date): new_date = '' for d in unicode_arabic_date: if d != '-': new_date+=str(unicodedata.decimal(d)) else: new_date+='-' return new_date print date_conv(s) 1994-04-11 回答2: Here is a method I wrote to solve it: def arab_to_decimal(timestamp

Regular expressions (regex) in Japanese

旧时模样 提交于 2020-01-10 08:51:24
问题 I am learning about Regular expressions (regex) for English and although some of the concepts seem like they would apply to other languages such as Japanese, I feel as if many others would not. For example, a common use of regex is to find if a word has non alphanumeric characters. I don't see how this technique as well as others would work for Japanese as there are not only three writing systems, but kanji are also very complex and span a much greater range than alpha numeric characters do.