It has been quite a long time since my last post. During all this time, I continued to work on Flex. I developed a mobile app called Young Scholars for BlackBerry's Tablet Playbook. I did that as a start because Playbook's launch was giving some motivations for developers. Who developed an app for it and got published in their app world will be rewarded with a Playbook tablet. Okay. All the hard work cannot be justified for simply a free tablet. But I was having a lot of fun. My kids helped me to test the app aggressively as it is an app for kids. I got very good reviews about it even though there are not that many playbook users overall. However, I got busy with work and kids and didn't continue to push it out to Android and IOS. It should just require some polishing work and repackaging.
Adobe's abandoning of Flex was quite a set back. I since worked more on Java and primarily doing Java Development. Recently my passion for websites and mobile apps revived. I don't want to continue to use Flex any more. That's why I am not going to spend time to make the Flex Young Scholars app out to Android and IOS. I was being bad when I pushed that out to PlayBook. I did it in a short time period about 2 months. After that I didn't spend much time on it and ignored some users' email to ask for some tech support. Since Flex's future is very dim and I don't want to do any maintenance work if I have to push out a Flex app. But I am thinking to change the app into more popular languages, such as HTML5 with java script. The app itself is very good idea. I am not bragging but I was pretty addict to it. It is a shame that I don't have the app on my phone and play with it more.
So here we go again. Learning something new. To be honest, I am really not a big fan of java script. In a conference a while ago, I learned that java script actually had nothing to do with java. The year when it came out, java was pretty popular. So it was marketing strategy that the new scripting language for the web was named java script. How misleading is that.
But never mind, if that's the only choice. Let's see how it works. I learned from a developer friend that ReactJS seems pretty good. Facebook is at the back of it so it should have something good. It could be a better choice than Angular JS.
Striving to produce simple, elegant and powerful technology solutions
Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts
Thursday, December 24, 2015
Wednesday, March 4, 2009
How to: Use LocaleManager
(For Part I, Introduction of LocaleManager, click here.)
It is very easy to use the locale manager. It is a standalone application that runs on window.
It is very easy to use the locale manager. It is a standalone application that runs on window.
The executable and some test input files can be downloaded from
Github
Github
To use it, just follow the screen captures.
1. Start the program. Then select base locale directory, e.g. en_us.
2. After clicking ok, the base locale name will be shown in red color on the dialog. Also the sibling sub-directories will be displayed in the list box on the left as existing locale. For anybody using subversion, the svn directory also showed up and that shouldn't be selected as a target locale.
3. After selecting locales to work on, click Load and the worksheet will show as follows. My test input files only have 3 lines so it doesn't look impressive. This window is resizable. This worksheet form shows the resource name, its value in base locale and values in selected locales. It is very easy to see which ones are not translated yet.
The target locale file will be reorganized to use the same resource entries as in base. Any entries that exist in base but not in target will be added to the target locale with a blank value. Any entries that exist in target but not in base will be taken out and save to a Mismatch_timestamp.log located in the same folder as the .exe file.
Click Save Changes before close the window and changes made will be saved to target file. Base file will not be touched.

The target locale file will be reorganized to use the same resource entries as in base. Any entries that exist in base but not in target will be added to the target locale with a blank value. Any entries that exist in target but not in base will be taken out and save to a Mismatch_timestamp.log located in the same folder as the .exe file.
Click Save Changes before close the window and changes made will be saved to target file. Base file will not be touched.

A new feature I just added is the Translate function. You can simply double click on an item under a target locale column, that item will be translated. A message box will pop up to ask you if you want to use that translation to replace the existing one.
The default translator is Microsoft Translator. Not all languages are supported by Microsoft right now. So you can use the menu to select Google Translator to see if your language is supported. I checked a few languages to make sure that the request will get some good response. Such as for Chinese, the parameter I pass to Microsoft Translator is "zh-CHS", but for Google, I need to use "zh_cn". So if you don't get any result from either of the translator, you can try to tweak the request by simply rename your locale folder, whose name is used by LocaleManager to send request to Microsoft or Google.
When you want all items to be translated, click on Translate All on the menu bar, the software will try to send a translate request to Microsoft or Google to translate "Hello World". So take a look at the returned result first. If the result is good, that means all the parameters and your internet connection is working well. If the result is not good or some errors returned, click "No" on the MessageBox to cancel the translation. Click "Yes" will only be a waste of time.
When you have many items to translate, the UI may appear to be frozen. But just leave it like that. It is going to come back when it is done. When I get some time, I can try to add more codes to make the UI more responsive.
LocaleManager - a practical tool to manage resources files of different locales for Flex and .NET
A problem I have been facing recently during Flex development is that the en_US base locale files change from time to time as new strings are added to codes and it is hard to keep the files for other locales in sync. I couldn't find any simple and free tool like this on the web so I decided to develop it by myself.
This app allows a user to select a base locale and any other locale or locales to work on. Then it displays the name and value of resources in a table. Users can keep track of which entries need to be translated or simply work on this table to fill all the blanks. The changes will be saved with UTF8 encoding.
It supports two types for resource files:
This tool can be downloaded from Github.
It is a C# implementation. The sources for the initial version are also available on Google, but later I started using my own svn and the codes on Google are far from the latest.
Here is the link on How to use the tool.
Or see the post on CodeProject.
This app allows a user to select a base locale and any other locale or locales to work on. Then it displays the name and value of resources in a table. Users can keep track of which entries need to be translated or simply work on this table to fill all the blanks. The changes will be saved with UTF8 encoding.
It supports two types for resource files:
- .properties files for Java or Flex
- .resx files for .Net
locale-
--- en_US - resource files in English
--- de - resource files in German
--- fr - resource files in French
For .Net Developers, you can refer to my article about ResourceBundle to see how it is possible to organize resource files this way for .Net applications including WPF applications.
This tool can be downloaded from Github.
It is a C# implementation. The sources for the initial version are also available on Google, but later I started using my own svn and the codes on Google are far from the latest.
Here is the link on How to use the tool.
Or see the post on CodeProject.
Subscribe to:
Posts (Atom)


