Skip to Content Skip to Menu

[#5446] Unicode Aliases for Vietnamese site

  • haidinh
  • haidinh
  • OFFLINE
  • Posts: 94
  • Thanks: 8
  • Karma: 0
9 years 3 months ago - 9 years 3 months ago #268851 by haidinh
Hi supporters,

My webstite is crafst.com.

My website using Vietnamese so that I want to turn on "Unicode Aliases". But when creating blogs from CB, the alias are not created correctly.

While I create article using core joomla function (click on "CREATE ARTICLE"), it still works. Alias is still unicode.

Can you tell me how to solve that problem?

You can try with:

[REMOVED]: Do not post credentials here.


Thank you and looking forwards to hearing your reply.

Hai
Attachments:
Last edit: 9 years 3 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
9 years 3 months ago #268899 by krileon
Replied by krileon on topic Unicode Aliases for Vietnamese site
That's probably not going to work with CB Blogs. It has its own Alias generation function, which is based off Joomlas. It has no support for that parameter. Have added a feature ticket to look into implementing this for a later release.

forge.joomlapolis.com/issues/5446


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: haidinh

Please Log in or Create an account to join the conversation.

  • haidinh
  • haidinh
  • OFFLINE
  • Posts: 94
  • Thanks: 8
  • Karma: 0
9 years 3 months ago #269189 by haidinh
Replied by haidinh on topic Unicode Aliases for Vietnamese site
Thank you Krileon,

Because I use Vietnamese for my site. When I create a blog, the auto alias cannot be read by human. For example:

The title of blog is "Đại học Việt Nam trong bảng xếp hạng thế giới"

The auto alias will be "139-i-h-c-vi-t-nam-trong-b-ng-x-p-h-ng-th-gi-i-2".

If the alias cannot be exactly like the title, please tell me if you know anyway to make the alias nicer, like: "dai-hoc-viet-nam-trong-bang-xep-hang-the-gioi"?

Thank you and regards,

Hai Dinh

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
9 years 3 months ago #269213 by krileon
Replied by krileon on topic Unicode Aliases for Vietnamese site
The alias is generated from the title, but in your case our usage doesn't support the Unicode parameter so it's not generating how you're expecting. We'll have to implement support for it. For now there's nothing you can do unless you want to try modifying the source code below, which converts title to alias.

IN: components/com_comprofiler/plugin/user/plug_cbblogs/models/joomla25.php
ON: Line 230


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: haidinh

Please Log in or Create an account to join the conversation.

  • haidinh
  • haidinh
  • OFFLINE
  • Posts: 94
  • Thanks: 8
  • Karma: 0
9 years 3 months ago #269257 by haidinh
Replied by haidinh on topic Unicode Aliases for Vietnamese site
Thank you Krileon.

Please Log in or Create an account to join the conversation.

  • haidinh
  • haidinh
  • OFFLINE
  • Posts: 94
  • Thanks: 8
  • Karma: 0
9 years 3 months ago #269258 by haidinh
Replied by haidinh on topic Unicode Aliases for Vietnamese site
Hi Krileon,

Can you help me a litle more on this issue.

In this code:

private static function getTitleAlias( $title )
{
$alias = str_replace( '-', ' ', $title );
$alias = trim( cbIsoUtf_strtolower( $alias ) );
$alias = preg_replace( '/(\s|[^A-Za-z0-9\-])+/', '-', $alias );
$alias = trim( $alias, '-' );
return $alias;
}

When I delete this line:

$alias = preg_replace( '/(\s|[^A-Za-z0-9\-])+/', '-', $alias );

The alias become better. It still unicode but, spaces are replaced with "%20".

Like this:

Title: Những động vật quý hiếm ở xứ sở các vị thần

Alias: 145-những%20động%20vật%20quý%20hiếm%20ở%20xứ%20sở%20các%20vị%20thần-3

Can you tell me how to replace "%20" with a dash "-" ? Or there is any other way to create the alias?

Thank you very much and looking forwards to hering from you.

Hai Dinh

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum