Summary.php -> How to make one for English, one for Chine

Summary.php -> How to make one for English, one for Chine

Postby hhtmp88 on Fri Nov 09, 2007 4:36 am

Dear all,

I am setting up a multi-Lingual Blog site, so I wonder if we can set up:
-> one summary_en.php for English
and collect the summary for all English blogs
(i.e those blogs who select English as its default language)


-> one summary_cht.php for Traditional Chinese
and collect the summary for all Traditional Chinese blogs


-> and one summary_chs.php for Simplified Chinese
and collect the summary for all Simplified Chinese blogs


Thanks for any kinds of help!

Rgd,
JMY(晉明夷)
http://mfYoga.org -- Mindfulness Yoga Association |瑜伽班 |瑜伽課程 |瑜伽訓練班 |靜坐班
http://jm3ime.com -- JinMing3-Key Chinese Input Method 晉明三鍵輸入法
hhtmp88
 
Posts: 61
Joined: Wed Mar 21, 2007 3:15 am

Postby phunkphorce on Fri Nov 09, 2007 7:02 am

There's no need to do that.

You can pass a "lang" parameter to summary.php so that it will use a different language than the default one. You should use one of the locale codes as the value for the parameter, such as:

http://www.yoursite.com/summary.php?lang=zh_CN
http://www.yoursite.com/summary.php?lang=zh_TW
http://www.yoursite.com/summary.php?lang=en_UK

And so on... These are not displayed by default in the summary templates, so you will need to customize the templates to add the links yourself.

Even better, you can let summary.php to choose the right language to show based on the language preferences set by the user in the browser. So if users have configured their browser to request Chinese if available, then summary.php will be shown in Chinese by default. You need to enable this behaviour by setting 'use_http_accept_language_detection' to 'Yes' in admin.php->Administration->Settings->Summary.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby hhtmp88 on Fri Nov 09, 2007 8:37 am

Thanks phunkphorce!

It works now!

However, when I change the locale to en_UK, i.e. accessing mysite using:
http://www.yoursite.com/summary.php?lang=en_UK

, all the Chinese Blog Content turn into garbage!
-> checking "locale_en_UK.php" that the encoding is in "iso-8859-1", so I change it into "utf-8" as shown belows:
********************************************
$messages['encoding'] = 'utf-8';
$messages['locale_description'] = 'English locale file for LifeType (utf-8_encoding)';
********************************************


After uploading the corrected locale_en_UK.php to the locale directory, and check from the admin backend by going to:
-> Administration ->Manage Locales ->Site Locales

-> unfortunately, the locale, en_UK does not show new value (i.e. utf8) and is still displaying:
"en_UK iso-8859-1 English locale file for LifeType"

-> Trying to delete the locale, but failed and the following error message displayed:
*********************************
There was an error deleting locale "en_UK"
*********************************


So what is the right procedure to update the locale_en_UK.php file?

Thanks for any kinds of help!

Rgds,
JMY(晉明夷)
http://mfYoga.org -- Mindfulness Yoga Association |瑜伽班 |瑜伽課程 |瑜伽訓練班 |靜坐班
http://jm3ime.com -- JinMing3-Key Chinese Input Method 晉明三鍵輸入法
hhtmp88
 
Posts: 61
Joined: Wed Mar 21, 2007 3:15 am

Postby phunkphorce on Fri Nov 09, 2007 4:01 pm

Can you try deleting the tmp/ folder?
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby hhtmp88 on Fri Nov 09, 2007 10:08 pm

It's strange that I have no ways to delete the "tmp" folder, nor any of the files /folders under it!

The following is the list of the folders under the folder public_html/blog/tmp/:
1 ------------------- 775 (file permissions)
cache_0 to cache_f -- 700
summary ------------- 775

I have tried to set their file permissions to "777", but none of them can be done!

so any new ideas?

Thanks for any kinds of help!

Rgds,
JMY(晉明夷)
http://mfYoga.org -- Mindfulness Yoga Association |瑜伽班 |瑜伽課程 |瑜伽訓練班 |靜坐班
http://jm3ime.com -- JinMing3-Key Chinese Input Method 晉明三鍵輸入法
hhtmp88
 
Posts: 61
Joined: Wed Mar 21, 2007 3:15 am

Postby phunkphorce on Sat Nov 10, 2007 7:56 am

Please, don't expect us to give you all the answers. It helps to look around the admin interface sometimes: admin.php->Administration->Miscellaneous->Clean Up->Clean Temporary folder
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby hhtmp88 on Sat Nov 10, 2007 6:43 pm

phunkphorce wrote:Please, don't expect us to give you all the answers. It helps to look around the admin interface sometimes: admin.php->Administration->Miscellaneous->Clean Up->Clean Temporary folder


Thanks phunkphorce!
I will try it out next time when I encounter the same issue.


May I ask the deepmost issues of this post?
-> since I am creating multi-lingual blogs in three languages: English, Traditional Chinese and simplified Chinese,

-> how can I make the summary pages:
* summary_en.php for displaying summary of the English blogs ONLY and no blogs in other languages


* summary_cht.php for displaying summary of the Traditional Chinese blogs ONLY and no blogs in other languages


* summary_chs.php for displaying summary of the Simplified Chinese blogs ONLY and no blogs in other languages


-> just like:
http://wordpress.com for English blogs ONLY
http://zh-tw.wordpress.com for Traditional Chinese ONLY
http://zh-cn.wordpress.com for Simplified Chinese ONLY

Thanks for any kinds of help!

Rgds,
JMY(晉明夷)
http://mfYoga.org -- Mindfulness Yoga Association |瑜伽班 |瑜伽課程 |瑜伽訓練班 |靜坐班
http://jm3ime.com -- JinMing3-Key Chinese Input Method 晉明三鍵輸入法
hhtmp88
 
Posts: 61
Joined: Wed Mar 21, 2007 3:15 am

Postby phunkphorce on Mon Nov 12, 2007 4:21 pm

If you want to do something like that, then you'll have to create your own summary_xx.php scripts and create your own code for loading posts in the right language from the database.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby hhtmp88 on Tue Nov 13, 2007 5:32 am

It seems that the following is the right file to start with:
"<LT directory/class/summary/controller/summarycontroller.class.php"


, but how can I specify a specific language for listing blogs and posts of that particular language?


Thanks for any kinds of help!

Rgds,
JMY(晉明夷)
http://mfYoga.org -- Mindfulness Yoga Association |瑜伽班 |瑜伽課程 |瑜伽訓練班 |靜坐班
http://jm3ime.com -- JinMing3-Key Chinese Input Method 晉明三鍵輸入法
hhtmp88
 
Posts: 61
Joined: Wed Mar 21, 2007 3:15 am

Postby phunkphorce on Tue Nov 13, 2007 3:04 pm

As I said before, Lifetype does not have database code that allows to load posts from blogs in one specific language. In fact if you look at the lt_blogs table, you can't even see in which language a blog is written so first of all you need to come up with your own code to load the right posts, and then figure out the rest...
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby hhtmp88 on Tue Nov 13, 2007 10:28 pm

Dear all,
----------

I am not sure how other webmasters of multi-lingual blog sites think, but to me, such feature is actually VERY VERY in-need!
-> just like what wordpress.com is doing;
-> so if you think the same as me, pls. voice up here!


Dear phunkphorce,
---------------------
Will the LT development team consider or plan this feature in the coming or next version of LT?


Thanks &Rgds!
JMY(晉明夷)
http://mfYoga.org -- Mindfulness Yoga Association |瑜伽班 |瑜伽課程 |瑜伽訓練班 |靜坐班
http://jm3ime.com -- JinMing3-Key Chinese Input Method 晉明三鍵輸入法
hhtmp88
 
Posts: 61
Joined: Wed Mar 21, 2007 3:15 am

Postby phunkphorce on Wed Nov 14, 2007 8:24 am

We are not considering implementing such feature. And in fact you're the first one to request it, we have not heard any other user make a similar request.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby hhtmp88 on Wed Nov 14, 2007 9:29 pm

phunkphorce wrote:We are not considering implementing such feature. And in fact you're the first one to request it, we have not heard any other user make a similar request.


I have no solid evidence, but I believe the major users of LT use LT for single language blog and not the multi-lingual one,

-> if they use LT as multi-lingual blog, you have such a need!
-> unless, they install one LT for one language


Or they don't know LT can manage multi-lingual site in a single installation!
-> just like LT's great capability to manage multi-blogs in a single user account!

,just look at the followings real sites and you will see such need:
http://wordpress.com for English blogs ONLY
http://zh-tw.wordpress.com for Traditional Chinese ONLY
http://zh-cn.wordpress.com for Simplified Chinese ONLY

-> I believe many bloggers will "feel uncomfortable" to see the text in their unknown language, being mixed inside what they are browsing arround.


Pls. kindly consider this feature in the future version, unless it is technically not feasible or very difficult to implement.

Thanks & Rgds!
JMY(晉明夷)
http://mfYoga.org -- Mindfulness Yoga Association |瑜伽班 |瑜伽課程 |瑜伽訓練班 |靜坐班
http://jm3ime.com -- JinMing3-Key Chinese Input Method 晉明三鍵輸入法
hhtmp88
 
Posts: 61
Joined: Wed Mar 21, 2007 3:15 am

Postby reto on Sun Nov 18, 2007 5:20 pm

Hi hhtmp88

I can see good reasons for your feature request. And I think we can at least keep it in mind in case anyone of us would like to implement it. AFAIK and as phunkphorce already said, this is not something we have considered in the past and therefore isn't implemented in a weekend.

cheers, reto
reto | wiki | Downloads
reto
Lifetype Expert
 
Posts: 395
Joined: Sat Apr 17, 2004 12:34 pm

Postby hhtmp88 on Tue Nov 20, 2007 10:06 am

Thanks Reto for your support!

Looking Forwards to see such feature in the future!

Rgds,
JMY(晉明夷)
http://mfYoga.org -- Mindfulness Yoga Association |瑜伽班 |瑜伽課程 |瑜伽訓練班 |靜坐班
http://jm3ime.com -- JinMing3-Key Chinese Input Method 晉明三鍵輸入法
hhtmp88
 
Posts: 61
Joined: Wed Mar 21, 2007 3:15 am


Return to Localization

cron