This project has moved and is read-only. For the latest updates, please go here.

How to user shfb in Chinese

Sep 1, 2010 at 10:59 AM

I'm Chinese. I write the comments in Chinese, and use shfb to build msHelp2, however it dosen't generate the comments in Chinese.

How can I do to get msHelp or chm file in Chinese? 

Sep 1, 2010 at 8:51 PM

You can set the Language property in the project.  However, that's only part of the process.  Sandcastle does not come with any translations of its resource files.  SHFB contains a set for a few items that it overrides but the reset will default to English.  See the Localizing Language Resource Files topic in the SHFB help file for more information.  Note also that if building a Help 1 (CHM) file, you may need to make use of the DBCS Fix plug-in to overcome some limitations with the Help 1 compiler.



Sep 2, 2010 at 2:34 AM
Edited Sep 2, 2010 at 3:40 AM

I do not use resource files in the beginning,  I just change a word in my comments file(.xml) to Chinese.

In my SHFB project,  I set project properties as below:

FrameworkVersion: 2.0.50727

HelpFileFormat : MSHelp2

Language: Chinese(PRC)

and paths, other properties are default,  however the comments in Chinese do not exist in the result Help 2 file.

Here is some build output

Copying XML comments files
SHFB: Warning BE0061: File '...\Sandcastle\comments.xml' could not be loaded and will not be used as an XML comments file.  Error: 给定编码中的字符无效。 行 9,位置 13 (the character is invalid for given encoding. line 9, position 13).
SHFB: Warning BE0062: No XML comments files found.  The help file will not contain any member comments.
Generating shared content files (zh-CN, 中文(中华人民共和国))...
SHFB: Warning BE0003: Sandcastle shared content for the 'zh-CN, 中文(中华人民共和国)' language could not be found.  Using 'en-US, English (US)' defaults.
    Last step completed in 00:00:00.1251


Sep 2, 2010 at 4:34 AM

The problem has been solved, I think it's my fault!

But I have another question, how to register the namespace and help files(.hxs) to use it in "Microsoft Document Explorer",

Thank you!

Sep 2, 2010 at 8:39 PM

See the MS Help 2 Category Properties and the Deploying an MS Help 2 File topics in the SHFB help file.



Sep 3, 2010 at 1:40 AM

How to register a filter used in "Microsoft Document Explorer", Thank you!

Sep 3, 2010 at 3:15 AM

I think you need to add some help attributes to the topics which you could do through the HelpAttributes project property but I'm not sure.  You'd be better off asking that in the MSDN Dev Doc forum.