How to change the Content and Chapter to Chinese character in generated PDF
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 35
- Joined: Thu Aug 15, 2019 5:31 pm
How to change the Content and Chapter to Chinese character in generated PDF
Hi experts,
We generated one PDF using the transformation scenario DITA Map PDF - based on HTML5 & CSS but the Contents and Chapter in the PDF are still English.
How can we change the Contents, Chapter1,Chapter2 and etc to Chinese words.
Thanks a lot.
We generated one PDF using the transformation scenario DITA Map PDF - based on HTML5 & CSS but the Contents and Chapter in the PDF are still English.
How can we change the Contents, Chapter1,Chapter2 and etc to Chinese words.
Thanks a lot.
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to change the Content and Chapter to Chinese character in generated PDF
Post by julien_lacour »
Hello,
For now, if you want the Content, Chapter 1, etc... texts to be translated in chinese you have to set your ditamap @xml:lang attribute to "zh-cn" (the value should be all in lower case).
Regards,
Julien
For now, if you want the Content, Chapter 1, etc... texts to be translated in chinese you have to set your ditamap @xml:lang attribute to "zh-cn" (the value should be all in lower case).
Regards,
Julien
-
- Posts: 35
- Joined: Thu Aug 15, 2019 5:31 pm
Re: How to change the Content and Chapter to Chinese character in generated PDF
Hi Julien,
Thanks a lot. I have followed your guide, but it is not working. I have tried set the "xml:lang" to "zh", "zh-cn", "zh-CN", neither of them works.
Could you please help give me another hand on this?
Thanks a lot.
Thanks a lot. I have followed your guide, but it is not working. I have tried set the "xml:lang" to "zh", "zh-cn", "zh-CN", neither of them works.
Code: Select all
<map xml:lang="zh-cn">
Thanks a lot.
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to change the Content and Chapter to Chinese character in generated PDF
Post by julien_lacour »
Hello,
Can you please verify if the attribute xml:lang is not set inside one of your topics.
If this attribute is set, it changes the display in the output PDF.
If this not resolve your problem, can you please send us a small sample of your map?
Regards,
Julien
Can you please verify if the attribute xml:lang is not set inside one of your topics.
If this attribute is set, it changes the display in the output PDF.
If this not resolve your problem, can you please send us a small sample of your map?
Regards,
Julien
-
- Posts: 35
- Joined: Thu Aug 15, 2019 5:31 pm
Re: How to change the Content and Chapter to Chinese character in generated PDF
Hi Julien,
We need to set the xml:lang="zh" in every our topic so that to make sure the generated text will be Chinese.
Our map is like this:
And the Contents part in PDF is as below:
We need to set the xml:lang="zh" in every our topic so that to make sure the generated text will be Chinese.
Our map is like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map xml:lang="zh">
<title xml:lang="zh">CBS产品文档中文</title>
<topichead navtitle="快速入门" xml:lang="zh-CN">
<topicref href="quickstart_0001.dita"/>
<topicref href="quickstart_0002.dita"/>
<topicref href="quickstart_0003.dita"/>
<topicref href="quickstart_0004.dita"/>
<topicref href="troubleshooting.dita"/>
</topichead>
</map>
Code: Select all
Contents
Chapter 1. 快速入门..............................................................................................................1
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to change the Content and Chapter to Chinese character in generated PDF
Post by julien_lacour »
Hello,
As I explain in my first answer, the ditamap xml:lang attribute must be set to "zh-cn".
In your case the result should be like this:
After that, the Contents, Chapters, etc... will appear in chinese.
Regards,
Julien
As I explain in my first answer, the ditamap xml:lang attribute must be set to "zh-cn".
In your case the result should be like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map xml:lang="zh-cn">
<title xml:lang="zh">CBS产品文档中文</title>
<topichead navtitle="快速入门" xml:lang="zh-CN">
<topicref href="quickstart_0001.dita"/>
<topicref href="quickstart_0002.dita"/>
<topicref href="quickstart_0003.dita"/>
<topicref href="quickstart_0004.dita"/>
<topicref href="troubleshooting.dita"/>
</topichead>
</map>
Regards,
Julien
-
- Posts: 35
- Joined: Thu Aug 15, 2019 5:31 pm
Re: How to change the Content and Chapter to Chinese character in generated PDF
Hi Julien,
One more question is that why the number in content is in wrong postion?
Such like:
It should be:
How can we figure this out? Thanks a lot
One more question is that why the number in content is in wrong postion?
Such like:
Code: Select all
第 章1. 快速入门.....................................................................................................................1
Code: Select all
第1章. 快速入门.....................................................................................................................1
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to change the Content and Chapter to Chinese character in generated PDF
Post by julien_lacour »
Hello,
We have corrected this behavior in the current release of DITA-OT CSS Publishing to PDF Plugin.
If you want, you can contact us at support@oxygenxml.com and we can provide you a SNAPSHOT of the new version for testing.
Regards,
Julien
We have corrected this behavior in the current release of DITA-OT CSS Publishing to PDF Plugin.
If you want, you can contact us at support@oxygenxml.com and we can provide you a SNAPSHOT of the new version for testing.
Regards,
Julien
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service