internationalization

Unicode filenames on Windows in Ruby

随声附和 提交于 2020-01-14 07:27:03
问题 I have a piece of code that looks like this: Dir.new(path).each do |entry| puts entry end The problem comes when I have a file named こんにちは世界.txt in the directory that I list. On a Windows 7 machine I get the output: ???????.txt From googling around, properly reading this filename on windows seems to be an impossible task. Any suggestions? 回答1: You're out of luck with pure ruby (either 1.8 or 1.9.1) since it uses the ANSI versions of the Windows API. It seems like Ruby 1.9.2 will support

How to set 3 languages with php?

二次信任 提交于 2020-01-14 06:46:13
问题 I try to insert a third language in an existing page wich is already in french and english. I'm kind of beginner with php. Here's the code: <?php $lang = (isset($_GET['lang']) && $_GET['lang'] == 'en') ? 'en' : 'fr' ; $langParam = ($lang == 'en') ? '&lang=en' : ''; $typeTerms = array( 'fr' => array( 'WINES' => 'vins', 'BEERS' => 'Bières', 'MALTCOOLER' => 'boisson à base de malt', 'CIDER' => 'cidres', 'ALCOHOLFREE' => 'produits sans alcool<br/>et à faible teneur en alcool', 'OTHERS' => 'autres

Serve an i18n angular app on Firebase using functions

╄→гoц情女王★ 提交于 2020-01-14 04:08:10
问题 I'm trying to handle requests correctly to a localized angular app hosted on Firebase. The goal is to load the right app bundle depending on: 1) A cookie named locale . 2) The accept-language header. 3) Default to en-us when others are unavailable. When localizing angular apps with i18n, angular-cli generates bundles (versions of your app) for each language/locale present in angular.json . Firebase serves your bundles as static content and it has serious security measurements disallowing path

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

旧巷老猫 提交于 2020-01-14 01:43:12
问题 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)

How to add internationalization support to Blogger?

孤街醉人 提交于 2020-01-13 18:30:10
问题 How to add internationalization support to Blogger? Is it possible to deal with multiple languages within one blog? Is it possible to add own translation and don't use Google Translate widget? Thanks. 回答1: These should be set in html head of your blog (Design -> Edit HTML, insert after <head>) <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js' type='text/javascript'></script> <script src='http://csjs.googlecode.com/files/csjs_1.1.3.js' type='text/javascript'><

Angular 7 i18n translation inside service, component and without template

北城以北 提交于 2020-01-13 17:14:12
问题 I am trying to migrate from ngx-translate to Angular i18n approach and wanted to make sure a few points before migration. Is it possible to translate inside the service and component without any template? In ngx-translate it was possible using translate pipe. Is there any approach which angular has introduced for V7 or planning to introduce in v8 for translating inside component and service level? Is this currently only possible using workaround and there is no angular way to do it? If yes,

Angular 7 i18n translation inside service, component and without template

纵然是瞬间 提交于 2020-01-13 17:13:13
问题 I am trying to migrate from ngx-translate to Angular i18n approach and wanted to make sure a few points before migration. Is it possible to translate inside the service and component without any template? In ngx-translate it was possible using translate pipe. Is there any approach which angular has introduced for V7 or planning to introduce in v8 for translating inside component and service level? Is this currently only possible using workaround and there is no angular way to do it? If yes,

Collator doesn't sort right for given Locale

久未见 提交于 2020-01-13 09:48:46
问题 Here's the locale alphabet order: wikipedia Here's my code: public static void main(String[] args) { Locale loc = new Locale("sr","RS"); Collator col = Collator.getInstance(loc); col.setStrength(Collator.SECONDARY); List<String> slova = new ArrayList<String>(); slova.add("Austrija"); slova.add("Slovačka"); slova.add("Č"); slova.add("Đ"); slova.add("C"); slova.add("Grčka"); slova.add("Slovenija"); slova.add("Španija"); slova.add("Švajcarska"); slova.add("Švedska"); slova.add("Srbija");

Changing the language for Subversion error messages

荒凉一梦 提交于 2020-01-13 08:21:36
问题 For some reason, subversion is returning me error messages in what I think is German: # svn up . svn: Zielpfad existiert nicht Unfortunately, I don't know that language... Before I resort to using a online translation engine to work with this, I figured I'd try to fix it. I figure I'm just doing something very simple wrong. I'm running subversion 1.6.4 installed via yum on centos (upgraded from 1.4.something that was having the same problem). This is on a VPS admined with CPanel. From what I

Where are the AngularJS I18n files?

岁酱吖の 提交于 2020-01-13 07:33:45
问题 They talk about locale-specific files here http://docs.angularjs.org/guide/i18n but don't mention where to get them (the official AngularJS repo doesn't contain them). So where does one obtain these locale files? 回答1: You can also get them with bower : bower install angular-i18n It is the official bower distribution that mirrors the files at https://code.angularjs.org/ More info at https://github.com/angular/bower-angular-i18n 回答2: Lastest stable version i18n files at here: http://code