Last modified by Pascal Robert on 2015/05/04 04:24

From version 58.1
edited by Pascal Robert
on 2012/02/11 08:39
Change comment: There is no comment for this version
To version 63.1
edited by Pascal Robert
on 2015/05/04 04:24
Change comment: Renamed back-links.

Summary

Details

Page properties
Parent
... ... @@ -1,0 +1,1 @@
1 +documentation.Home.Development Architecture.Localization.WebHome
Tags
... ... @@ -1,0 +1,1 @@
1 +internationalization|localization|favourite
Content
... ... @@ -1,11 +1,10 @@
1 1  == Unicode ==
2 2  
3 -See also: [[UTF-8 Encoding Tips>>doc:UTF-8 Encoding Tips]]
3 +See also: [[doc:documentation.Home.Development Architecture.Localization.UTF-8 Encoding Tips.WebHome]]
4 4  
5 5  To Enable Unicode for your WO app, add the following to your application constructor:
6 6  
7 7  {{code}}
8 -
9 9  WOMessage.setDefaultEncoding("UTF8");
10 10  
11 11  {{/code}}
... ... @@ -15,7 +15,6 @@
15 15  Then you just need to tell the browser. Make all your .wo pages include this meta tag in their HTML:
16 16  
17 17  {{code 0="xml"}}
18 -
19 19  <html>
20 20  <head>
21 21  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
... ... @@ -28,7 +28,6 @@
28 28  Great tip - here is a simple method call you can stick in your Application object to automatically achieve the results outlined above:
29 29  
30 30  {{code}}
31 -
32 32  private boolean enableUTFEncoding = false;
33 33  
34 34  public void enableUTFEncoding() {
... ... @@ -53,7 +53,6 @@
53 53  To make sure that UTF-8 is supported in multipart forms as well, you have to add the following code to your Application object:
54 54  
55 55  {{code}}
56 -
57 57  public WORequest createRequest(String aMethod, String aURL, String anHTTPVersion,
58 58   NSDictionary someHeaders, NSData aContent, NSDictionary someInfo) {
59 59   WORequest newRequest = super.createRequest(aMethod, aURL, anHTTPVersion,
... ... @@ -68,7 +68,7 @@
68 68  
69 69  With Jesse's code and this extension, you will be able to handle UTF-8 character data correctly in your WO application.
70 70  
71 -If you use localized strings in your UTF-8 application you may also check out Project Wonder's [[ERXLocalizer>>doc:WOnder-ERXLocalizer]] class.
67 +If you use localized strings in your UTF-8 application you may also check out Project Wonder's [[ERXLocalizer>>doc:documentation.Home.Frameworks.Project Wonder.WOnder-ERXLocalizer.WebHome]] class.
72 72  
73 73  === Project Localization tips ===
74 74  
... ... @@ -83,7 +83,6 @@
83 83  Let's say your project will be available in English and Japanese. You'll want to include the following in your Project->Resources->Properties file:
84 84  
85 85  {{noformat}}
86 -
87 87  # Localization
88 88  er.extensions.ERXLocalizer.defaultLanguage=English
89 89  er.extensions.ERXLocalizer.fileNamesToWatch=("Localizable.strings","ValidationTemplate.strings")
... ... @@ -98,7 +98,6 @@
98 98  Note that if you need to customize the locale for a language, such as Canadian French, you can do so with this property:
99 99  
100 100  {{noformat}}
101 -
102 102  er.extensions.ERXLocalizer.French_CA.locale = fr_ca
103 103  
104 104  {{/noformat}}
... ... @@ -107,7 +107,6 @@
107 107   (% style="color: rgb(51,51,51);" %)In the above case after adding canadian french these would change in:
108 108  
109 109  {{noformat}}
110 -
111 111  er.extensions.ERXLocalizer.availableLanguages=(English,Japanese,French_CA)
112 112  
113 113  {{/noformat}}
... ... @@ -115,7 +115,6 @@
115 115  (% style="color: rgb(51,51,51);" %)Localized formatters use this property:
116 116  
117 117  {{noformat}}
118 -
119 119  er.extensions.ERXLocalizer.useLocalizedFormatters=false
120 120  
121 121  {{/noformat}}
... ... @@ -155,7 +155,6 @@
155 155  In this example we set the type to //Array// and add an item for each needed language setting its value to the language code. This must be done for each attribute in our model we want to localize. If you have many localized attributes that have the very same list of languages and you will likely be changing that list in the future you can define your language list either for a whole model or for all models instead. The first way to specify a per model language list is to put an ERXLanguages key into the user info of the model. For a global setting put that key into your property file:
156 156  
157 157  {{noformat}}
158 -
159 159  ERXLanguages = (en,jp,fr_ca)
160 160  
161 161  {{/noformat}}
... ... @@ -172,7 +172,6 @@
172 172  If you are defaulting to direct actions, you may not have a session. If you do not have a session, the server will return the default language specified in the Properties mentioned above. If you're using direct actions and you don't like that behavior, you can stick this in your direct action class:
173 173  
174 174  {{code}}
175 -
176 176  @Override
177 177   public WOActionResults performActionNamed(String actionName) {
178 178   if(!context().hasSession()) {
... ... @@ -199,6 +199,6 @@
199 199  
200 200  ===== Localization presentation from WOWODC West 2009 =====
201 201  
202 -Guido Neitzer did a localization presentation at WOWODC West 2009 that give a good overview of how to localize your apps. The presentation is available [[here>>url:http://www.wocommunity.org/podcasts/wowodc/west09/WOWODCW09-Localization.mov||shape="rect"]].
192 +Guido Neitzer did a localization presentation at WOWODC West 2009 that give a good overview of how to localize your apps. The presentation is available [[here>>url:http://www.wocommunity.org/podcasts/wowodc/west09/WOWODC09W-Localization.mov||shape="rect"]].
203 203  
204 204  
ERXLocalizerEclipseLayout.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +15.8 KB
Content
ERXLocalizerUserInfo.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +74.0 KB
Content
ERXLocalizerUserInfo_correct.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +66.3 KB
Content
LocalizerTest.zip
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +53.0 KB
Content