plone / plone.i18n

Text normalization logic and language, country, cctld data.
8 stars 11 forks source link

Added Chinese normalizer. #9

Closed jianaijun closed 11 years ago

jianaijun commented 11 years ago

It has been used in multiple production sites, and work well.

yangh commented 11 years ago

Well done, Jianaijun, I really don't like to reinvent the wheel.

Personally, I'd like that also add IIDNormalizer for zh. It's useful when user doesn't specify id for a page which has Chinese in the title.

Thanks.

jianaijun commented 11 years ago

IIDNormalizer for ZH (existed before now have been removed), adding it does not solve the problem (when user doesn't specify a page ID for which has Chinese in the title.)

Plone.i18n only use UserPreferredLanguages normalized string, Do not attempt to use all available language Normalizer .

jianaijun commented 11 years ago

If you use readset.i18n-1.0.dev0, you will find that, in fact, it has already been registered IIDNormalizer for ZH .

For a string, attempt to use all available language Normalizer is seems unnecessary and may result in performance issues. Use UserPreferredLanguages Normalizer might be the best choice.