Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 11-03-2024, 05:20 AM   #1
halts
Junior Member
halts began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2024
Device: Kindle Oasis 3
Could calibre convert support zh-hant variable?

Following up on the previous discussion "[When Calibre convert, the input language is zh-tw, but the output language become zh]"

I've noticed an ongoing issue with Traditional Chinese (zh-hant) language handling in Calibre's conversion process. Currently, while Calibre can process Traditional Chinese content, there seems to be inconsistent handling of the language tag specifications.

Current Behavior:

Input files with language tag zh-tw,zh-hk,zh-hant... are being converted
code: <dc:language>zh-tw</dc:language>
After input, the language tag is simplified to just zh
code: <dc:language>zh</dc:language>

This affects metadata consistency and could impact text processing

Why this matters:

Traditional Chinese (zh-hant) is distinctly different from Simplified Chinese (zh-hans)

Requested Enhancement:
Could we add support for maintaining the zh-hant language variable throughout the conversion process? This would:
  • Better align with international language standards
  • Improve accuracy in language identification
  • Help maintain consistent metadata
  • Support users working with Traditional Chinese content

Technical Note:
The zh-hant tag is the standard BCP 47 language tag for Traditional Chinese, which would be more precise than the region-specific zh-tw.
Has anyone else encountered this issue? Any thoughts on implementing this enhancement?
Thank you for considering this request.
halts is offline   Reply With Quote
Old 11-03-2024, 05:54 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,027
Karma: 27109258
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Why not use zh-tw? What readers/reading software actually works with zh-hant and not zh-tw?
kovidgoyal is offline   Reply With Quote
Advert
Old 11-08-2024, 12:42 AM   #3
halts
Junior Member
halts began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2024
Device: Kindle Oasis 3
Quote:
Originally Posted by kovidgoyal View Post
Why not use zh-tw? What readers/reading software actually works with zh-hant and not zh-tw?
because I need to use zh-hant instead of zh-TW for amazon kindle's Traditional Chinese support. zh-TW will be recognized as Simplified Chinese by all Kindle devices.

Thanks for your time ^ ^
halts is offline   Reply With Quote
Old 11-08-2024, 12:47 AM   #4
halts
Junior Member
halts began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2024
Device: Kindle Oasis 3
I made a modified for plugin KFX Output, as calibre not support zh-hant, I added some code to convert zh-TW to zh-hant to support kindle's Traditional Chinese.

Repo is here https://github.com/lcandy2/calibre-k...tional-chinese (readme in Traditional Chinese)

But using calibre build-in function send-to-kindle, I don't know what calibre did with the kfx file, the kfx sent to kindle by calibre will be recognized to Simplified Chinese again. Replacing the kfx file sent by calibre with the original calibre library one by manually copying files, renaming files, replacing files could solve the problem.
halts is offline   Reply With Quote
Old 11-08-2024, 06:41 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,027
Karma: 27109258
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Look at the metadata update code that set the language metadata.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-08-2024, 11:00 PM   #6
halts
Junior Member
halts began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2024
Device: Kindle Oasis 3
Every time I update the language data to zh-hant, it always simply becomes zh by calibre some optimization. zh-TW is an exception. Maybe not modifying zh-hant as same as zh-TW, when language is Chinese in metadata.
halts is offline   Reply With Quote
Old 11-09-2024, 01:43 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,027
Karma: 27109258
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The languages field is based on ISO 639-3. Only languages in that standard are supported.
kovidgoyal is offline   Reply With Quote
Old 11-11-2024, 02:29 AM   #8
halts
Junior Member
halts began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2024
Device: Kindle Oasis 3
yes but simplified chinese and traditional chinese use complete different express system. like fonts, words, pronounces. it has more differences than the difference between english(england) and english(usa) or english(india) and english(usa). it would be nice to have a zh-hant support for kindle devices's traditional chinese
halts is offline   Reply With Quote
Old 11-11-2024, 03:46 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,027
Karma: 27109258
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No doubt, but that field is tied to ISO 639 it does not support english variants either.
kovidgoyal is offline   Reply With Quote
Reply

Tags
calibre, chinese, conversion, epub

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Percent variable Poloman69 PocketBook 0 07-31-2024 03:54 PM
Looking for convert bin with svg support domenan Kindle Developer's Corner 10 09-12-2018 12:23 PM
Library name as calibre template variable mdb5972 Calibre 6 01-15-2011 03:09 PM


All times are GMT -4. The time now is 05:21 AM.


MobileRead.com is a privately owned, operated and funded community.