internationalization

PHP - Creating image with imagettftext with Greek text

…衆ロ難τιáo~ 提交于 2019-12-24 17:53:37
问题 I'm trying to use imagettftext to create an image using this Greek text "από τον/την". This text is read from a MySQL database table from a field whose collation is set to utf8-unicode-ci. The text comes out of the database as "από τον/την". Here's the code (lifted from php.net) header('Content-Type: image/png'); // Create the image $im = imagecreatetruecolor(400, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128

i18n model doesn't work properly

我是研究僧i 提交于 2019-12-24 16:30:45
问题 I have a code that checks a response from a server and shows message box according to the information received. I have these messages in 2 languages (user selects a language during login). Here is example: if(sResponse == 'IDfail'){ sap.m.MessageBox.alert ("{i18nResourceModel>idnotnine}", {icon: sap.m.MessageBox.Icon.ERROR, title: "{i18nResourceModel>error}"} ); } Here is i18n model declaration (it is declared before I use the model, of course): var oResourceModel = new sap.ui.model.resource

Sparql multi lang data compression to one row

我是研究僧i 提交于 2019-12-24 12:04:40
问题 I'd like to select data property values using sparql with some restrictions on their languages: I have an ordered set of preferred languages ("ru", "en", ... etc ) If an item have more than one language for value, I'd like to have only one value restricted by my set of languages (if ru is available - I want to see ru value, else if en available I want to see en else if ... etc if no lang available - no lang value). Current query is: select distinct ?dataProperty ?dpropertyValue where { <http:

Getting proper text input from physical keyboard in Android

痴心易碎 提交于 2019-12-24 10:58:32
问题 I have a View that overrides the OnKeyDown event. I can get the Key Code and the KeyEvent, but it seems that I'm missing something. Let me explain. For non-US keyboard layouts, the Key Code I'm getting is wrong. For example, when I press the ñ key in my Spanish keyboard , I expect to receive a "ñ" letter, but instead I get a Keycode.AltLeft as Key Code. How do I get the real letter? Another problematic case is with accentuated characters: When I press the ´ key and the o key, I shouldn't

Internationalization of strings with JavaScript Dynamic variable

浪子不回头ぞ 提交于 2019-12-24 10:46:53
问题 There are two JS strings in my js file. JS File Before localization: var a = 'There are no stores in this area.'; Functions.php wp_localize_script( 'store-locator', 'storelocatorjstext', array( 'nostores' => __( 'There are no stores in this area.', 'storelocator' ) ) ); I use the above code to localize the script. And then in JS. I write the following JS File After localization: var a = storelocatorjstext.nostores; This works fine. But what if I have a dynamic variable in my JS script? Like

Computer-assisted translation for GWT recommendations

妖精的绣舞 提交于 2019-12-24 10:38:17
问题 We are looking for a suitable solution to translate our GWT application collaboratively. We have a bunch of constants and messages property files that need to be translated by different people. Till now we've emailed the files and manually merged the translated content back which obviously doesn't scale very well. Is there any tool (preferably an open source project) you can recommend that does play well with the i18n support of GWT and allow for collaboratively translation? 回答1: There is a

Django removes translation in po file, string in mark_safe

天涯浪子 提交于 2019-12-24 09:58:45
问题 I try to translate string, which is in mark_safe() function: from django.utils.translation import ugettext as ug ... mark_safe('<div style="text-align:center"><a href="/calendar/" target="_blank" onclick="return open_popup(this); return false">%s</a></div>' % ug(u'show full calendar')) Unfortunately, when I run run django-admin.py makemessages -l pl, it doesn't include this string in .po file. I have to edit it manually, write this line and then it works fine (the string is translated). It

read key from LocalizedResource.properties programmatically

这一生的挚爱 提交于 2019-12-24 09:39:06
问题 I able to use LocalizedResource.properties with uibinder. let say i have widget that created programmatically in java file. how to read in key from LocalizedResource.properties depending on language "en,fr..etc" selected by users? 回答1: It's difficult to say something definitely. If your LocalizedResource.properties is generated as described by "Internationalization - UiBinder" so I don't understand why you want to read in key from it If .properties made for Message or Constant interface so

Japanese characters in URL/FTP server

◇◆丶佛笑我妖孽 提交于 2019-12-24 09:32:14
问题 Can URL or FTP server addresses contain Japanese characters? How about an FTP username and password? 回答1: Hostnames may contain any Unicode character using IDN (Punycode). So: 例え.テスト xn--r8jz45g.xn--zckzah are the same site. Other parts of a URL are encoded using UTF-8 and normal URL-encoding. So: http://例え.テスト/メインページ http://xn--r8jz45g.xn--zckzah/%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%9A%E3%83%BC%E3%82%B8 are the same address expressed as an IRI and a URI. If you included a username:password in

How to use correctly gettext with git?

会有一股神秘感。 提交于 2019-12-24 09:06:41
问题 I have a small application that I develop and I am distributing; now I would like to add i18n support to it with gettext. I see that gettext requires running several commands and generating various files (and updating them when new strings are included in the source code). What is the usual way to have gettext interact with a typical git workflow? Should I generate my .pot file myself and include it in the repository, or should it be generated automatically at build time by my Makefile? What