Localizing application help on Symbian
extkbeditor1
(Talk | contribs) m |
hamishwillee
(Talk | contribs) m (Hamishwillee - Bot update - Fix links) |
||
| (7 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| − | + | {{Archived|timestamp=20120715145253|user=[[User:Lpvalente|Lpvalente]]}} | |
| − | + | [[Category:Localization]][[Category:Symbian C++]][[Category:Code Snippet]][[Category:Code Snippet]][[Category:S60 3rd Edition (initial release)]][[Category:S60 3rd Edition FP1]][[Category:S60 3rd Edition FP2]] | |
| − | {{ | + | |
| − | {{ | + | |
| + | {{ArticleMetaData <!-- v1.2 --> | ||
| + | |sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) --> | ||
| + | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| + | |devices= Nokia E90 Communicator | ||
| + | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | ||
| + | |platform= S60 3rd Edition<br/>S60 3rd Edition, FP1<br/>S60 3rd Edition, FP2 | ||
| + | |devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) --> | ||
| + | |dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --> | ||
| + | |signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| + | |keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase --> | ||
| + | |language= <!-- Language category code for non-English topics - e.g. Lang-Chinese --> | ||
| + | |translated-by= <!-- [[User:XXXX]] --> | ||
| + | |translated-from-title= <!-- Title only --> | ||
| + | |translated-from-id= <!-- Id of translated revision --> | ||
| + | |review-by= <!-- After re-review: [[User:username]] --> | ||
| + | |review-timestamp= <!-- After re-review: YYYYMMDD --> | ||
| + | |update-by= <!-- After significant update: [[User:username]]--> | ||
| + | |update-timestamp= <!-- After significant update: YYYYMMDD --> | ||
| + | |creationdate= 20080131 | ||
| + | |author= [[User:Tapiolaitinen]] | ||
| + | <!-- The following are not in current metadata --> | ||
| + | |subcategory= Localization | ||
|id= CS000810 | |id= CS000810 | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
}} | }} | ||
==Overview== | ==Overview== | ||
| − | This code example describes how to localize the help files of an application. | + | {{Abstract|This code example describes how to localize the help files of an application.}} |
This snippet can be self-signed. | This snippet can be self-signed. | ||
| Line 20: | Line 37: | ||
==Steps== | ==Steps== | ||
| − | 1. Create a help file for all the languages that you need to support. See [ | + | 1. Create a help file for all the languages that you need to support. See [[Implementing context-sensitive help on Symbian]] for information on how to implement help files. |
| − | 2. Edit the makefile ( | + | 2. Edit the makefile ({{Icode|group\help.mk}}) so that it compiles the localized help resources: |
<code> | <code> | ||
| Line 57: | Line 74: | ||
'''Note:''' When editing the makefile, make sure that you use tabulators instead of spaces, or you get the error "HELP.MK:27: *** missing separator. Stop." | '''Note:''' When editing the makefile, make sure that you use tabulators instead of spaces, or you get the error "HELP.MK:27: *** missing separator. Stop." | ||
| − | 3. Wherever you have used | + | 3. Wherever you have used {{Icode|App.hlp.hrh}}, you should now use {{Icode|App_sc.hlp.hrh}} because the {{Icode|KContextApplication}} constant can be found there: |
<code> | <code> | ||
| Line 65: | Line 82: | ||
Make sure that you use the same identifier in each help file (rtf), so that it does not matter which one of the hrh files you include. | Make sure that you use the same identifier in each help file (rtf), so that it does not matter which one of the hrh files you include. | ||
| − | 4. Insert the LANG attribute as well as all the help-related files into the | + | 4. Insert the LANG attribute as well as all the help-related files into the {{Icode|group\[app].mmp}} file: |
<code> | <code> | ||
| − | LANG | + | LANG SC 01 09 |
SOURCEPATH ..\help | SOURCEPATH ..\help | ||
| − | DOCUMENT | + | DOCUMENT help_sc.rtf |
| − | DOCUMENT | + | DOCUMENT help_09.rtf |
| − | DOCUMENT | + | DOCUMENT help_sc.xml |
| − | DOCUMENT | + | DOCUMENT help_09.xml |
| − | DOCUMENT | + | DOCUMENT custom.xml |
</code> | </code> | ||
| − | 5. Make sure that the localized help resources are compiled into the SIS package (see | + | 5. Make sure that the localized help resources are compiled into the SIS package (see {{Icode|sis\[app].pkg}}): |
<code> | <code> | ||
| Line 92: | Line 109: | ||
==See also== | ==See also== | ||
| − | * [ | + | * [[Implementing context-sensitive help on Symbian]] |
| − | + | ||
| − | + | ||
Latest revision as of 07:51, 17 July 2012
The article is believed to be still valid for the original topic scope.
Article Metadata
Tested with
Compatibility
S60 3rd Edition, FP1
S60 3rd Edition, FP2
Article
Overview
This code example describes how to localize the help files of an application.
This snippet can be self-signed.
Steps
1. Create a help file for all the languages that you need to support. See Implementing context-sensitive help on Symbian for information on how to implement help files.
2. Edit the makefile (group\help.mk) so that it compiles the localized help resources:
makmake :
cshlpcmp ..\help\help_sc.xml
cshlpcmp ..\help\help_09.xml
ifeq (WINS, $(findstring WINS, $(PLATFORM)))
copy ..\help\App_sc.hlp $(EPOCROOT)\epoc32\$(PLATFORM)\c\resource\help
copy ..\help\App_09.hlp $(EPOCROOT)\epoc32\$(PLATFORM)\c\resource\help
endif
clean :
del ..\help\App_sc.hlp
del ..\help\App_sc.hlp.hrh
del ..\help\App_09.hlp
del ..\help\App_09.hlp.hrh
bld :
cshlpcmp ..\help\help_sc.xml
cshlpcmp ..\help\help_09.xml
ifeq (WINS, $(findstring WINS, $(PLATFORM)))
copy ..\help\App_sc.hlp $(EPOCROOT)\epoc32\$(PLATFORM)\c\resource\help
copy ..\help\App_09.hlp $(EPOCROOT)\epoc32\$(PLATFORM)\c\resource\help
endif
freeze lib cleanlib final resource savespace releasables :
Note: When editing the makefile, make sure that you use tabulators instead of spaces, or you get the error "HELP.MK:27: *** missing separator. Stop."
3. Wherever you have used App.hlp.hrh, you should now use App_sc.hlp.hrh because the KContextApplication constant can be found there:
#include "App_sc.hlp.hrh"
Make sure that you use the same identifier in each help file (rtf), so that it does not matter which one of the hrh files you include.
4. Insert the LANG attribute as well as all the help-related files into the group\[app].mmp file:
LANG SC 01 09
SOURCEPATH ..\help
DOCUMENT help_sc.rtf
DOCUMENT help_09.rtf
DOCUMENT help_sc.xml
DOCUMENT help_09.xml
DOCUMENT custom.xml
5. Make sure that the localized help resources are compiled into the SIS package (see sis\[app].pkg):
{
"..\help\App_sc.hlp"
"..\help\App_09.hlp"
} -"!:\resource\help\App.hlp"6. Compile the files and create the SIS package.

