Forums / Translation / Chinese (Simplified) / TR files for Chinese?

TR files for Chinese?

|
|
Next topic
 »
Author Message

Guillaume Marty

Wednesday 11 May 2011 8:30:19 am

I've not been able to find an elegant way to display URLs in Chinese.

Deactivating URL translation or using urlalias_iri transform group doesn't really help.

I'm wondering if it's possible to use the translation file for Chinese that is in Derick Rethans's Transliteration extension (http://pecl.php.net/package/translit).

The file is here:
http://svn.php.net/viewvc/pecl/translit/trunk/data/han_transliterate.tr?view=markup

If we can use this file to transform URL, what else needs to be set up?

Chen Xiongjie

Thursday 12 May 2011 12:42:30 am

Hi, Guillaume,

As far as I know the urlalias_iri works well. Example: http://ezcn.org/chi/文档/eZ-Publish/基本概念/内容与界面

But there is one issue here - when copying the url, it's encoded, which is not user-friendly.

I'm not sure what's result of the Transliteration extension. But for Chinese specific, alternatively I would prefer to have latinized Pinyin mapped to Chinese characters. I think an extension for this will be welcome. In Pinyin, that url will be http://ezcn.org/chi/wendang/eZ-Publish/jibengainian/neirongyujiemian

eZ Comments: http://projects.ez.no/ezcomments
twitter: http://twitter.com/xiongjie

Guillaume Marty

Monday 30 May 2011 9:12:22 am

Hi!

I've successfully created a .tr file to transliterate the Chinese characters, but I've not been able to make it work properly.

The file /share/transformations/han.tr looks like this (and has 25,326 lines):

han:
U+5416 = "a"
U+5475 = "a"
U+9312 = "a"
U+9515 = "a"
U+963F = "a"
U+55C4 = "a"
U+554A = "a"
U+54C0 = "ai"
...
U+8444 = "zuo"
U+888F = "zuo"
U+9162 = "zuo"
U+963C = "zuo"

I set up /setting/override/transform.ini.append.php:

[Transformation]
Charsets[]=utf-8;han

[han]
Files[]=han.tr
Extensions[]

When I launch updateniceurls.php,everything looks fine, but my URL are still using the node_* pattern.

Did I miss something? Is it OK to send a pull request to the github repo even if it's not completely working?

eZ debug

Timing: Jan 29 2025 13:40:08
Script start
Timing: Jan 29 2025 13:40:08
Module start 'content'
Timing: Jan 29 2025 13:40:08
Module end 'content'
Timing: Jan 29 2025 13:40:08
Script end

Main resources:

Total runtime0.2147 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 588.0781180.7813
Module start 'content' 0.00820.0111 768.859495.2422
Module end 'content' 0.01930.1954 864.1016524.3281
Script end 0.2147  1,388.4297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00452.0769200.0002
Check MTime0.00200.9378200.0001
Mysql Total
Database connection0.00080.379510.0008
Mysqli_queries0.133662.20761410.0009
Looping result0.00150.70961390.0000
Template Total0.193790.210.1937
Template load0.00130.602110.0013
Template processing0.192489.583010.1924
Override
Cache load0.00090.441910.0009
Sytem overhead
Fetch class attribute can translate value0.00210.987710.0021
XML
Image XML parsing0.00030.129510.0003
General
dbfile0.026312.2584200.0013
String conversion0.00000.002330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs