×
Namespaces

Variants
Actions
(Difference between revisions)

Localizing application help on Symbian

From Nokia Developer Wiki
Jump to: navigation, search
tapiolaitinen (Talk | contribs)
(New page: __NOTOC__ __NOEDITSECTION__ {|style="background:#eceff2" width="660px" border="1" cellpadding="5" cellspacing="0" |- |'''ID''' ||   |'''Creation date''' || 31/01/2008 |- |'''Platfor...)
 
tapiolaitinen (Talk | contribs)
Line 10: Line 10:
 
|'''Tested on devices''' || Nokia E90
 
|'''Tested on devices''' || Nokia E90
 
|-
 
|-
|'''Category''' || Localization
+
|'''Category''' || Symbian C++
|'''Subcategory''' || 
+
|'''Subcategory''' || Localization
 
|-
 
|-
 
|'''APIs''' || None
 
|'''APIs''' || None
Line 30: Line 30:
 
1. Create a help file for all the languages that you need to support. See [http://wiki.forum.nokia.com/index.php/Implementing_Context-Sensitive_Help] for information on implementing the help files.
 
1. Create a help file for all the languages that you need to support. See [http://wiki.forum.nokia.com/index.php/Implementing_Context-Sensitive_Help] for information on implementing the help files.
  
2. Edit the makefile (group\help.mk) so that it compiles the localized help resources:
+
2. Edit the makefile (<tt>group\help.mk</tt>) so that it compiles the localized help resources:
  
 
<code>
 
<code>
Line 65: Line 65:
 
'''Note!''' When editing the makefile, make sure that you use tabulators instead of spaces. (If you don't, the error you would get is: "HELP.MK:27: *** missing separator.  Stop.")
 
'''Note!''' When editing the makefile, make sure that you use tabulators instead of spaces. (If you don't, the error you would get is: "HELP.MK:27: *** missing separator.  Stop.")
  
3. Wherever you have used App.hlp.hrh, you should now use App_sc.hlp.hrh, because KContextApplication constant can be found from there:
+
3. Wherever you have used <tt>App.hlp.hrh</tt>, you should now use <tt>App_sc.hlp.hrh</tt>, because <tt>KContextApplication</tt> constant can be found from there:
  
 
<code>
 
<code>
Line 73: Line 73:
 
Make sure that you use the same identifier in each help file (rtf), so that it doesn't 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 doesn't 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:
+
4. Insert the LANG-attribute as well as all the help-related files into the <tt>group\[app].mmp</tt> file:
  
 
<code>
 
<code>
Line 86: Line 86:
 
</code>
 
</code>
  
5. Make sure the localized help resources get compiled into sis package (see sis\[app].pkg):
+
5. Make sure the localized help resources get compiled into sis package (see <tt>sis\[app].pkg</tt>):
  
 
<code>
 
<code>
Line 100: Line 100:
  
 
* [http://wiki.forum.nokia.com/index.php/Implementing_Context-Sensitive_Help Implementing Context-Sensitive Help]
 
* [http://wiki.forum.nokia.com/index.php/Implementing_Context-Sensitive_Help Implementing Context-Sensitive Help]
 +
 +
[[Category:Symbian C++]][[Category:Localization]]

Revision as of 17:01, 4 February 2008


ID   Creation date 31/01/2008
Platform S60 3rd Ed. MR Tested on devices Nokia E90
Category Symbian C++ Subcategory Localization
APIs None Classes None
Methods None    

Overview

This code example describes how to localize the help files of the application.

This snippet can be self-signed.

Steps

1. Create a help file for all the languages that you need to support. See [1] for information on implementing the 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. (If you don't, the error you would get is: "HELP.MK:27: *** missing separator. Stop.")

3. Wherever you have used App.hlp.hrh, you should now use App_sc.hlp.hrh, because KContextApplication constant can be found from there:

#include "App_sc.hlp.hrh"

Make sure that you use the same identifier in each help file (rtf), so that it doesn't 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 the localized help resources get compiled into 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.

See also

67 page views in the last 30 days.