Readable URL for unicode language?

AI-generated summary

The discussion revolves around creating readable URLs for non-English languages, specifically Vietnamese, on a Discourse forum. drakey1988 seeks advice on removing accent marks from URLs to make them more readable. Bcat suggests a plugin, but awesomerobot and gerhard recommend using the built-in slug generation method set to encoded, which supports Unicode characters. gerhard also warns against using plugins that override built-in features, while Bcat expresses concerns about the impact of changing the slug generation method on existing article links.

Hi there,

I am operating a Vietnamese community via Discourse. Our members obviously/mostly would create topics in Vietnamese.

For example, the Vietnamese title:
Nghề tổ chức sự kiện - Bắt đầu như thế nào?

would generate “unreadable” URL like:
/ngh-t-ch-c-s-ki-n-b-t-d-u-nh-th-nao/633

Is there anything that I can do to make it into a more “readable” URL like:
/nghe-to-chuc-su-kien-bat-dau-nhu-the-nao/633

Just need to remove the accent marks when generates the URLs.

I am a non-tech admin, can self-research, tinkering with configs and do some basic backend changes.

Appreciate the good works and thank you.

1 Like

~~Use: https://github.com/thangngoc89/discourse-vietnamese-slug~~

1 Like

There’s a built-in setting in Discourse called slug generation method, if you change that to encoded it should show the correct characters.

Screen Shot 2020-05-19 at 10.35.06 PM

9 Likes

Many thanks. That is awesome, I will check now.

I wouldn’t use that plugin anymore. It overrides stuff it shouldn’t and cripples the Unicode usernames feature. I highly recommend using the built-in slug generation methods as well as Unicode usernames if those are needed.

5 Likes

Thanks, but I’ve been using it since the day I created the site so deleting it will now have an impact on my current article links!
Currently, the User Name must only include numbers, letters, dashes, periods and underscores, and the Name will still display Unicode.
Username without Unicode is still convenient for tagging and logging.

Unicode on urls is common, but will need to be considered for this.

1 Like