What is envolved in modifiing a component to work in Japanese?
-
- Joomla! Apprentice
- Posts: 40
- Joined: Tue Dec 26, 2006 1:44 am
What is envolved in modifiing a component to work in Japanese?
What is evolved in modifying a component to work in Japanese?. I understand that it needs to run in UTF-8 but where do I set this to force to code to run in UTF-8. I know with asp this is done with . Does php have something similar??
Many thanks
Many thanks
-
- Joomla! Apprentice
- Posts: 30
- Joined: Mon Jan 01, 2007 5:13 am
- Contact:
Re: What is envolved in modifiing a component to work in Japanese?
I would like to know the answer to this too. I am working with the Cinema componet and having trouble with odd characters showing up.
Get a website today at Quik-Site.com. Quick, easy, affordable and 100% Joomla compatible!
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Nov 18, 2006 3:33 am
- Location: Japan
Re: What is envolved in modifiing a component to work in Japanese?
Do you use apache2 ?
If you use apache2 ,please try the setting in httpd.conf or .htaccess as below.
AddDefaultCharset Off
And check the mbstring module of PHP is enabled.
If you use apache2 ,please try the setting in httpd.conf or .htaccess as below.
AddDefaultCharset Off
And check the mbstring module of PHP is enabled.
-
- Joomla! Apprentice
- Posts: 30
- Joined: Mon Jan 01, 2007 5:13 am
- Contact:
Re: What is envolved in modifiing a component to work in Japanese?
Using apache 1.3.37 - mbstring is enabled.
Get a website today at Quik-Site.com. Quick, easy, affordable and 100% Joomla compatible!
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Nov 18, 2006 3:33 am
- Location: Japan
Re: What is envolved in modifiing a component to work in Japanese?
hello computerlady911,
and which character encode was used in your www browser ?
When the trouble with odd charactoers were shown, wich charset did show in your site html source code ?computerlady911 wrote: I would like to know the answer to this too. I am working with the Cinema componet and having trouble with odd characters showing up.
and which character encode was used in your www browser ?
-
- Joomla! Apprentice
- Posts: 30
- Joined: Mon Jan 01, 2007 5:13 am
- Contact:
Re: What is envolved in modifiing a component to work in Japanese?
UTF8 in both cases. I will note that this particular componpontent has a line that cuts off the text after so many characters. Here is an example ofthe code. I think it does not know how to tell when a Japanese word ends. Perhaps I could replace the code so it reads, cut off after x number of words.
Code: Select all
$line=1;
foreach($rows as $row1) {
$text=substr ($row1->imgtext, 0, $cin_testolista);
$linecolor = ($line % 2) + 1;
echo "<tr class='$cin_line".$linecolor."'><td width='1%' align='center' valign='top'>";
echo "<a href='".sefRelToAbs("index.php?option=com_cinema&Itemid=$Itemid&task=detail&id=$row1->id")."'><img src='$thumbnailpath$row1->imgthumbname' alt='$row1->imgtitle' width='60' style=' border-left : 1px solid #fef; border-top : 1px solid #fef; border-right: 1px solid #eee; border-bottom: 1px solid #ddd; border-right-style: outset; border-bottom-style: outset'></a>";
echo "<td width='99%'><a href='".sefRelToAbs("index.php?option=com_cinema&Itemid=$Itemid&task=detail&id=$row1->id")."'><strong>$row1->imgtitle</strong></a>";
if ($cin_showdetail) echo "<span class='small'> "." [ $row1->nazione ]</span>";
echo "<br /><em>$row1->imgtitle2</em><br />";
echo "$text...<br /><br />";
echo "</td>";
$line++;
}
echo "</tr></table>";
Get a website today at Quik-Site.com. Quick, easy, affordable and 100% Joomla compatible!
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Nov 18, 2006 3:33 am
- Location: Japan
Re: What is envolved in modifiing a component to work in Japanese?
Code: Select all
substr ($row1->imgtext, 0, $cin_testolista)
In UTF-8, The length of almost one Japanese malti-byte character is 3 byte.
but the length of one latin character is single byte.
So, if "$row1->imgtext" don't include latin characters, and if the value of $cin_testlista is multiple of 3,
it will be successful.
I had tested some mb_xxxx functions, but any function had been successful.
humm,,, this is difficult ...
Does anyone have good idea ?
-
- Joomla! Apprentice
- Posts: 30
- Joined: Mon Jan 01, 2007 5:13 am
- Contact:
Re: What is envolved in modifiing a component to work in Japanese?
I changed the settings so that the cuttoff number is a multiple of 3. Some of the little questionmarks went away, but not all. Any other suggestions?
This site can be view at: http://www.sandiegoyuyu.com/component/o ... /catid,76/
This site can be view at: http://www.sandiegoyuyu.com/component/o ... /catid,76/
Get a website today at Quik-Site.com. Quick, easy, affordable and 100% Joomla compatible!
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Nov 18, 2006 3:33 am
- Location: Japan
Re: What is envolved in modifiing a component to work in Japanese?
I solve !
It needs 2 steps.
Step 1.
in /component/com_cinema/cinemaviewcategory.php
Change this code
to
Step 2.
in .htaccess
Add the following value
php_value mbstring.internal_encoding UTF-8
Please try
It needs 2 steps.
Step 1.
in /component/com_cinema/cinemaviewcategory.php
Change this code
Code: Select all
$text=substr ($row1->imgtext, 0, $cin_testolista);
Code: Select all
$text=mb_substr ($row1->imgtext, 0, $cin_testolista);
in .htaccess
Add the following value
php_value mbstring.internal_encoding UTF-8
Please try
-
- Joomla! Apprentice
- Posts: 30
- Joined: Mon Jan 01, 2007 5:13 am
- Contact:
Re: What is envolved in modifiing a component to work in Japanese?
Didn't work right. The php string was allready in the htaccess file but was commented out. I uncommented it and the entire site went down with a 500 error. I tried the change to the component with out the htaccess seting and it worked but I am getting way more text than I want.
Still playing.
Still playing.
Get a website today at Quik-Site.com. Quick, easy, affordable and 100% Joomla compatible!
-
- Joomla! Apprentice
- Posts: 30
- Joined: Mon Jan 01, 2007 5:13 am
- Contact:
Re: What is envolved in modifiing a component to work in Japanese?
Acutally it did work. I just need to change the Number of characters for Details: from 525 to 171.
Get a website today at Quik-Site.com. Quick, easy, affordable and 100% Joomla compatible!