internationalization

Different storyboard localization per target

徘徊边缘 提交于 2019-12-05 17:49:11
问题 I have a project with 3 targets. Each target needs to suppport only one language, but the language is not the same for each target. Currently I have Target 1 (es) Target 2 (es) Target 3 (pt) Most of my strings are in a Localizable.strings file, and I simply target a different file for each target. However, a number of strings are in my storyboards. My problem is that it does not seem possible to create different storyboard localization files for each target. If I change the targeting of the

'Un'-externalize strings from Eclipse or Intellij

烈酒焚心 提交于 2019-12-05 17:39:49
I have a bunch of strings in a properties file which i want to 'un-externalize', ie inline into my code. I see that both Eclipse and Intellij have great support to 'externalize' strings from within code, however do any of them support inlining strings from a properties file back into code? For example if I have code like - My.java System.out.println(myResourceBundle.getString("key")); My.properties key=a whole bunch of text I want my java code to be replaced as - My.java System.out.println("a whole bunch of text"); I wrote a simple java program that you can use to do this. Dexternalize.java

Converting UTF8 text for use in a URL

痞子三分冷 提交于 2019-12-05 17:29:15
I'm developing an international site which uses UTF8 to display non english characters. I'm also using friendly URLS which contain the item name. Obviously I can't use the non english characters in the URL. Is there some sort of common practice for this conversion? I'm not sure which english characters i should be replacing them with. Some are quite obvious (like è to e) but other characters I am not familiar with (such as ß). I normally use iconv() with the 'ASCII//TRANSLIT' option. This takes input like: último año and produces output like: 'ultimo a~no Then I use preg_replace() to replace

Automatic Translation tool for Android [closed]

亡梦爱人 提交于 2019-12-05 17:20:00
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Do you know if there is any free automatic localization tool currently out of the market ? It would be to translate my XML files from my android project The ones i have found all rely on Google translate API. Since this API is now paying(Since December 2011) all those tools are now obsoletes. The ones i have

Django i18n not recognizing language files

我的梦境 提交于 2019-12-05 16:20:56
On Django 1.4, I want to have two languages in my site, turkish('tr') and english('en'). This is my current setup: settings.py: USE_I18N = True LANGUAGES = ( ('en', 'English'), ('tr', 'Turkish'), ) MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', # I have locale middleware 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) LOCALE_PATHS = ( '/myproject/locale/', ) And

Korean characters are displayed as empty boxes on JTextField

允我心安 提交于 2019-12-05 16:13:37
JTextfield does not show korean charaters properly. It shows empty boxes in instead of characters. Here is the screenshot of my application. Thats because of the fonts that you used. According to this oracle document Korean letters is not supported by Lucida font. Note that of the writing systems that are generally fully supported by the JRE, the Lucida fonts do not support Chinese (Simplified), Chinese (Traditional), Japanese, and Korean. So if you use the fonts that support the korean language, it will work properly. 来源: https://stackoverflow.com/questions/42244385/korean-characters-are

Localization of numeric number in Rails

蹲街弑〆低调 提交于 2019-12-05 16:11:22
[Sorry for the new post, but my first one was focusing to arabic/persian numbers but it seems the issue is larger.] I wonder if someone had done a gem to handle the localization of numeric number in ruby/rails. I18n official locales ( https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale ) seems not to take care of that. It's kind of complex to do by helpers. Arabic is simple: ٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩ Persian too: ۰ ١ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۱۰ But all languages don't match 1-1 conversion with english, Chinese for example: 0: 〇 (零) líng 1: 一 (壹) yī 2: 二 (Simplified:贰;Traditional:貳) èr 3: 三

i18next Displayed key instead of value

﹥>﹥吖頭↗ 提交于 2019-12-05 16:05:09
I have translation.json file in /locales/en/ { "app": { "name": "Example App" } } In html , I have: <a href="/" data-i18n="app.name"> In js : $(document).ready(function() { var language_complete = navigator.language.split("-"); var language = (language_complete[0]); console.log('language', language); $.i18n.init({ lng: language, fallbackLng: false, debug: false }, function() { $('a').i18n(); }); }); It displayed app.name instead of Example App . What i missed in my code? Thanks You have to set useLocalStorage and useDataAttrOptions to true $.i18n.init({useLocalStorage: true ,

Where to place i18n key strings in Java

拥有回忆 提交于 2019-12-05 16:03:55
问题 When doing internationalization in Java, you assign a string key to each message. What's the best practice, on where to place those string keys. Goal is to allow easy refactoring (eg. key name changes), clean and readable code, separation of concerns but still no duplication of keys/messages even if called from different parts of the code. //bad way, strings directly in code messages.getString("hello_key"); - // better way, use String constants public static final String HELLO_KEY = "hello

How to convert .po to PHP array (Zend Framework) with Translate Toolkit?

我的梦境 提交于 2019-12-05 15:47:45
I am trying to use po2php to convert my .po file to Zend php translations array. I am simply trying this: $ po2php translations.po translations.php , but this results in an error that I do not understand: po2php: warning: Couldn't handle input file translations.po: don't know what to do with input format .po, no template file . I do not know what a template file is an why should I provide it? UPDATE: I also tried $ po2php translations.po translations.php -t messages.pot , but this does not help me, it shows pretty much the same error: po2php: warning: Couldn't handle input file translations.po