author | Eugene Ostroukhov <eugeneo@symbian.org> |
Tue, 30 Mar 2010 15:20:42 -0700 | |
changeset 292 | d1d1c556b0d1 |
parent 229 | 716254ccbcc0 |
permissions | -rw-r--r-- |
229
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
1 |
|
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
2 |
<!DOCTYPE html |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
3 |
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
4 |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="copyright" content="(C) Copyright 2009"/><meta name="DC.rights.owner" content="(C) Copyright 2009"/><meta name="DC.Type" content="concept"/><meta name="DC.Title" content="Localizing widget resources"/><meta name="abstract" content="You might need to localize widget resources, such as images, to support multiple languages."/><meta name="description" content="You might need to localize widget resources, such as images, to support multiple languages."/><meta name="DC.Relation" scheme="URI" content="GUID-0FEFAF39-7048-4F4A-8676-C4BF1AF37120"/><meta name="DC.Relation" scheme="URI" content="GUID-C442113C-5FBE-493E-AD5A-CF0A0FB3C5FD"/><meta name="DC.Relation" scheme="URI" content="GUID-1EFD7043-E9B8-4B4E-9EA6-A20B3EECC14A"/><meta name="DC.Relation" scheme="URI" content="GUID-E3EA4F85-E0AE-42AB-8E51-EFD3F0E0A51E"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-63F29096-C1A3-45DB-9E2F-6110562E0237"/><title>Localizing |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
5 |
widget resources </title><script type="text/javascript"> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
6 |
function initPage() {} |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
7 |
</script><link href="../PRODUCT_PLUGIN/book.css" rel="stylesheet" type="text/css"/><link href="css/s60/style.css" rel="stylesheet" type="text/css" media="all"/></head><body onload="initPage();"><div class="body"><div class="contentLeft prTxt"><h1 class="pageHeading" id="GUID-63F29096-C1A3-45DB-9E2F-6110562E0237">Localizing |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
8 |
widget resources</h1><div><p>You might need to localize widget resources, such as images, to |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
9 |
support multiple languages.</p> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
10 |
<div><h3>To localize widget resources</h3><ol> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
11 |
<li id="GUID-5D265B84-5E04-4D3C-B089-9C5433BF1030"><a name="GUID-5D265B84-5E04-4D3C-B089-9C5433BF1030"><!----></a><p>Create localized versions |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
12 |
of the resources for the languages that require localization.</p></li> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
13 |
<li id="GUID-184ACA6B-359E-4D0D-8EA6-69030BBF10A9"><a name="GUID-184ACA6B-359E-4D0D-8EA6-69030BBF10A9"><!----></a><p>Store the files into |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
14 |
the appropriate <a href="GUID-71BE0F0B-B6B2-475C-A87B-A04E207F3292.html#GUID-71BE0F0B-B6B2-475C-A87B-A04E207F3292">language |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
15 |
project directories</a>.</p></li> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
16 |
<li id="GUID-C70F6285-475A-438C-B01F-163EDAA5F83A"><a name="GUID-C70F6285-475A-438C-B01F-163EDAA5F83A"><!----></a><p>Provide default resources |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
17 |
in the widget root directory.</p><p>If a specific language does |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
18 |
not require resource localization, the resource files do not need to be included |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
19 |
in the corresponding language project directory. When that language is set |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
20 |
as the device language, the default resources are loaded and used.</p></li> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
21 |
</ol><p>When loading a localized resource, specify the path to the resource |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
22 |
file as relative to the widget root directory.</p></div> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
23 |
<div><h3>Example </h3><p>The following pieces of code provide an |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
24 |
example of widget resource localization for Finnish, English and for a default |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
25 |
case.</p><ol> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
26 |
<li id="GUID-638685CA-2861-4697-A250-E7A095FF46F9"><a name="GUID-638685CA-2861-4697-A250-E7A095FF46F9"><!----></a><p>Add the Finnish flag for use when system language is Finnish:</p><pre class="codeblock" id="GUID-79A0F7CE-B838-40C9-8FE3-68138D8E3AB3">[root]\fi.lproj\ |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
27 |
flag.png</pre><div class="figure" id="GUID-CA3E49DC-838C-4DAD-ACB4-05EF49C47332"><img src="GUID-16D4BAFC-1AC3-46B5-BA44-4B82014D97E9_d0e9797_href.png"/></div></li> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
28 |
<li id="GUID-F750BEF3-B86F-41D4-AD4B-66DFE98766B8"><a name="GUID-F750BEF3-B86F-41D4-AD4B-66DFE98766B8"><!----></a><p>Add the English flag for use when the system language is English:</p><pre class="codeblock" id="GUID-C1D1753A-57B1-45B8-8DCD-A11974053BDC">[root]\en.lproj\ |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
29 |
flag.png</pre><div class="figure" id="GUID-E78D9299-DB2E-443C-87F0-8B5FFD3BEBDC"><img src="GUID-C247B2C6-F997-42A7-AC7D-7D24F1F77A57_d0e9807_href.png"/></div></li> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
30 |
<li id="GUID-C62232C6-C74B-405F-9FB6-4E3F7AF790E2"><a name="GUID-C62232C6-C74B-405F-9FB6-4E3F7AF790E2"><!----></a><p>Add the UN flag for use with any other system language:</p><pre class="codeblock" id="GUID-EFDD13A6-9027-49C7-8FE3-A592E1B04565">[root]\ |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
31 |
flag.png</pre><div class="figure" id="GUID-327BF0D4-E90E-4647-97A1-90E61A91D1D3"><img src="GUID-C5FB6206-2BEB-494F-A1A4-3573E4310EC3_d0e9819_href.png"/></div></li> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
32 |
<li id="GUID-577ED378-949A-40D1-A5EC-F1C25DA1FC77"><a name="GUID-577ED378-949A-40D1-A5EC-F1C25DA1FC77"><!----></a><p>In the JavaScript file that implements the logic of the widget, create |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
33 |
the following code to load and show the appropriate flag dynamically. :</p><pre class="codeblock" id="GUID-077B2DF6-A2B2-454A-8E37-957C0DC8CC49">var flag = document.createElement('img'); |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
34 |
flag.setAttribute('src', 'flag.png'); |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
35 |
</pre></li> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
36 |
</ol></div> |
716254ccbcc0
Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff
changeset
|
37 |
</div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html> |