internationalization

Chrome Extension internationalization error?

老子叫甜甜 提交于 2019-12-11 17:43:08
问题 When i add "default_locale": "en", to my manifest file, then package it and try to upload it, i get the error message saying, An error occurred: Message JSON file must be in UTF-8 encoding. ... But this is how they tell you to set it up in their i18n page... What is the problem? 回答1: I'm not sure he's missing the Byte Order Mark -- which is neither required nor recommended in UTF-8 (as endianness isn't relevant) -- I think it's just the file encoding. I believe Notepad adds the BOM by default

Recommended way of translating authentication errors in symfony2

蓝咒 提交于 2019-12-11 17:34:26
问题 I need to display, for example, the "Bad credentials" message in another language. So far I found that it is thrown as an exception in \vendor\symfony\src\Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider.php authenticate function as throw new BadCredentialsException('Bad credentials', 0, $notFound); I am wondering what would be the recommended way for showing this message in another language. Just changing the string in this place seems non-optimal... Also

Special charcters in Android using PhoneGap

不打扰是莪最后的温柔 提交于 2019-12-11 16:39:55
问题 Im using PhoneGap to develop an android application. The problem is characters like ã â á ç are shown like ? (question mark) Has someone an idea to solve the problem? Thanks 回答1: You need to use the UTF-8 character set on your page. You can tell the browser to do so by adding this: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ... to the <head> section of your page. 回答2: In my Phonegap & jQueryMobile app, deployed on Android 4.0.3 device, I got a nastly little bit of

Angular: How to display a date in French format

混江龙づ霸主 提交于 2019-12-11 14:33:09
问题 I am an Angular beginner, I read the documentation of Angular, and it's hard for such an elementary thing... I want that the dates and other things in my application have the French locale, and not the default 'en-US'... I started to read this Angular documentation, that seems a little bit incomplete, cause, I did the doc states, and failed: >...\ClientApp>ng serve --configuration=fr Configuration 'fr' could not be found in project 'ClientApp'. OK, now I look on another documentation page on

Japanese in python function

天涯浪子 提交于 2019-12-11 14:07:34
问题 I wrote a function in Python which is used to tell me whether the two words are similar or not. Now I want to pass Japanese text in my same function. It is giving error "not a ascii character." I tried using utf-8 encoding, but then it giving the same error Non-ASCII character '\xe3' in file Is there any way to do that? I cant generate the msg file for that since the 2 keyword will be not be constant. Here goes the code def filterKeyword(keyword, adText, filterType): if (filterType ==

Cakephp 3.0.0-RC2 I18n::locale() doesn't works

丶灬走出姿态 提交于 2019-12-11 13:15:59
问题 I am using Cakephp 3.0.0-RC2. It work's fine but I can't change du language of the user at login. My login function doesn't work. It do nothing : public function login() { if ($this->request->is('post')) { $user = $this->Auth->identify(); if ($user) { $this->Auth->setUser($user); I18n::locale($user['lang']); return $this->redirect($this->Auth->redirectUrl()); } $this->Flash->error(__("Nom d'utilisateur ou mot de passe incorrect, essayez à nouveau.")); } } Notice that when I change the

How to use g:message from Javascript

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 13:11:50
问题 There are some messages coming from a Javascript file to a GSP page. How can I implement g:message in a Javascript page? For example: if ($('#name').val() == "") { $('#nameStatus').show(); $('#nameStatus').html('<font color=red>Company Name can not be blank</font>'); return false; 回答1: Try this kind of syntax : function foo() { return "${message(code:'my.message.code')}"; } 回答2: If I understand correctly, you want to be able to use the output from g:message in your javascript. There is a very

VB6 text appears as gibberish in one EXE but Hebrew in another

不羁的心 提交于 2019-12-11 13:11:25
问题 I have strange problem and minimal knowledge on VB6, I got an EXE file that takes text (for button captions) from a text file. This EXE which I don't has it code present all Hebrew text correctly. I have build another EXE file (Identical to the previous) and all the functionally is working but it present all Hebrew as Gibberish!! my text file encoding is Unicode. Can you help me? Is there encoding for vb6 exe? 回答1: The default VB form/control fonts do not support all "foreign" characters. If

Globalize3 - two translations in one view

ε祈祈猫儿з 提交于 2019-12-11 13:06:41
问题 I use gem globalize3. I want to get a translation posts in two languages​​, first in English and then in Russian in one index view. And I want to post that is not in English, was located below in Russian after the English posts. My problem is that since I have a default locale :en, and if: @posts = Post.with_translations(:en) I get posts in english as I need, if: @posts_ru = Post.with_translations(:ru) I get posts in english too..Probably because the default locale English How I can get

Can I use jquery.uls on a MediaWiki wiki to get a language code from the name of a language in English?

家住魔仙堡 提交于 2019-12-11 13:04:56
问题 WikiMedia has a jquery plugin called jquery.uls (Universal Language Selector) for choosing a language in all kinds of fancy ways. All MediaWiki sites seem to have it available to the JavaScript running on them via $.uls . There is documentation for the ULS extension but it seems to only concern itself with the server side and how an end user would interact with it. I want to know if I can use it to obtain a mapping from the English name of a language (such as "Vietnamese") to the ISO 639