Tagged: breadcrumb, header
-
AuthorPosts
-
August 23, 2013 at 3:13 am #28081
There is a problem with breadcrumb when using Japanese (or any non-ascii language). When a title is truncated because it is too long, it doesn’t cut off at a character boundary of UTF-8 (Unicode).
Please take a look at the right-side of the header breadbrumb at:
the two characters at the right (“��”) indicate UTF-8 characters are not correctly truncated.
Please fix this issue.
Thank you,
August 24, 2013 at 7:36 am #136387Hi,
Searching for a fix, I found this solution. If your PHP settings have ‘Multibyte String : mbstring.encoding_translation’ turned on, some special characters will not display, and cut any content following them. Can you please ask your host to disable this setting?
Regards,
Ismael
August 25, 2013 at 10:10 pm #136388Hello Ismael,
Thanks for taking this. mbstring.encoding_translation was turned off. See phpinfo at http://www.emeditor.org/phpinfo.php
I actually wrote this at a separate topic, and I wrote this same thing:
With a little search, I found a similar article:
http://stackoverflow.com/questions/8484162/how-to-truncate-an-utf8-string-in-php
I think using mb_strimwidth instead of substr will resolve this issue.
Would that help?
Thanks again,
August 26, 2013 at 1:51 am #136389Hey,
Edit framework > php > class-breadcrumb.php, find this code:
/* Set up the default arguments for the breadcrumb. */
$defaults = array(
'separator' => '»',
'before' => '<span class="breadcrumb-title">' . __( 'You are here:', 'avia_framework' ) . '</span>',
'after' => false,
'front_page' => true,
'show_home' => __( 'Home', 'avia_framework' ),
'echo' => false,
'show_posts_page' => true,
'truncate' => 70,
'richsnippet' => false
);Replace truncate with ‘140’ or something higher.
/* Set up the default arguments for the breadcrumb. */
$defaults = array(
'separator' => '»',
'before' => '<span class="breadcrumb-title">' . __( 'You are here:', 'avia_framework' ) . '</span>',
'after' => false,
'front_page' => true,
'show_home' => __( 'Home', 'avia_framework' ),
'echo' => false,
'show_posts_page' => true,
'truncate' => 140,
'richsnippet' => false
);Regards,
Ismael
August 26, 2013 at 6:36 pm #136390Thanks for your assistance. Actually, changing mb_strimwidth instead of substr code at:
wp-contentthemesenfoldframeworkphpfunction-set-avia-backend.php
fixed all.
Thanks!
August 27, 2013 at 12:33 am #136391 -
AuthorPosts
- The topic ‘Title breadcrumb in the header is not truncated correctly with Unicode’ is closed to new replies.