internationalization

problem on java calendar function

a 夏天 提交于 2020-01-04 05:13:16
问题 I declared Calendar and SimpleDateFormat like this: calendar = Calendar.getInstance(TimeZone.getTimeZone("Malaysia")); final SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MMMMM.dd hh:mm aaa"); or: calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+08:00")); Then I call this: sdf.format(calendar.getTime()); but result is not in correct time zone (+8 hours). What could be the problem? 回答1: Unless you are going to perform Date/Time related calculations, there is no point in

How do I set the UI language for a multi-threaded .NET process, independent of the OS language?

守給你的承諾、 提交于 2020-01-04 04:57:06
问题 Problem: I have a C# .NET 2.0 application developed on Windows 7 that has translated resources for multiple languages (ex. zh-CHS for Chinese, es for Spanish, etc.). I have a customer who wants to run their Windows 7 OS in English, but run my .NET application in Spanish ( es ). My application is multi-threaded, so just changing the culture of the main GUI thread is not sufficient for my needs (trust me, I tried). This is because other strings displayed to the user through the GUI are

How to set fx:value using resource bundle?

回眸只為那壹抹淺笑 提交于 2020-01-04 04:28:50
问题 In java fx it is possible to use i18n labels for components using the %key notation. For example - <Label layoutX="151.0" layoutY="14.0" text="%windowTitle"> <font> <Font size="22.0" /> </font> </Label> Is it possible to use i18n for component values? The following code does not work - <ChoiceBox layoutX="140.0" layoutY="67.0" prefWidth="164.0"> <items> <FXCollections fx:factory="observableArrayList"> <String fx:value="%listValue1" /> <String fx:value="%listValue2" /> <String fx:value="

Intl is not defined firefox

醉酒当歌 提交于 2020-01-04 03:43:14
问题 I have following java scripts code which runing well in chrome but fail in firefox and IE. the error message of FF is 'ReferenceError: Intl is not defined' the error message of IE is 'SCRIPT5009: 'Intl' is undefined ' <script> var co = new Intl.Collator('pinyin'); console.log(co); var co = new Intl.Collator('zh-Hans'); console.log(co); var co = new Intl.Collator('zh-Hans-CN'); console.log(co); </script> I just wonder why the standard object Intl can't be refer in FF or IE? did I miss

Intl is not defined firefox

时间秒杀一切 提交于 2020-01-04 03:41:10
问题 I have following java scripts code which runing well in chrome but fail in firefox and IE. the error message of FF is 'ReferenceError: Intl is not defined' the error message of IE is 'SCRIPT5009: 'Intl' is undefined ' <script> var co = new Intl.Collator('pinyin'); console.log(co); var co = new Intl.Collator('zh-Hans'); console.log(co); var co = new Intl.Collator('zh-Hans-CN'); console.log(co); </script> I just wonder why the standard object Intl can't be refer in FF or IE? did I miss

Showing Japanese Characters in TItle Bar of Java Program

有些话、适合烂在心里 提交于 2020-01-04 03:11:11
问题 I am able to display Japanese characters everywhere except for the title bar of the main window (JFrame) in Java. Is there a way to change the font of this title bar so it can display japanese characters? Thanks I am using Windows XP. If this matters I am using the Java Substance look and feel too. 回答1: A window's title bar is managed by the system window manager, not by Swing. You don't say what OS/GUI you're using. For Windows XP, open the Display control panel, select the "Appearance" tab,

How to use i18t for texts in the source code of Angular project?

北慕城南 提交于 2020-01-03 18:59:28
问题 I am using the i18n features of Angular 4 and building the project successfully with angular-cli in the target language. HTML templates are properly translated. However I got some texts in the javascript code. What's the recommended way of localizing strings used in js source for things like validations? Can we expect i18n to come with a solution? Currently I am using the locale to determine which translation to use. The Locale gets set from the ng serve --locale fr or ng build --locale fr

Angular - internationalization (i18n)

岁酱吖の 提交于 2020-01-03 17:53:26
问题 What is the best way to implement the internationalization for a angular application at the moment? 回答1: The official i18n angular2 will be implemented in one of the rc release before the final release. It also will be more advanced than the current solutions. More info how the new concept of i18n works in angular2: https://lingohub.com/blog/2015/03/angular-2-i18n-update-ng-conf-2015 UPDATE 6 SEPTEMBER 2016: Support for i18n is now official in Angular 2 RC6 Official release blog: https:/

Dynamically generate a list of available languages in Spring MVC

二次信任 提交于 2020-01-03 17:32:24
问题 I have set up i18n in Spring MVC 3, and it is working correctly. There are several files, each with its own language: messages_en.properties, messages_de.properties, etc. In one of my JSPs, I need to show the users a combo with all available languages, and I would like this list to be dynamic i.e. generated on the fly from the existing language files in the server. Is there any built-in method to generate this list? Or do I have to resort to check the folder where the language files reside

Wrong Java resource bundle loaded

烈酒焚心 提交于 2020-01-03 10:18:10
问题 In my application, I'm using java resource bundle for the translation of its labels. I currently have two files: resources.properties with labels in English (default language) resources_fr.properties with labels in French Then, I load the bundle properties with the following command: ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME, locale); ... where locale is the user's locale. When I'm working with a French web browser, that's ok, I'm getting all my messages in French, as my locale is