Create slug for languages other than english - for free

I’ve went through a few slug plugin options but faced a problem: they did not consider non-english characters, like we have in portuguese.
So I decided to make my own plugin to solve this issue and make it available for free for the community.

Enter the Slugify Free plugin.

Install it and use the Slugify action in the backend workflow, should resolve words with accents with ease, like those latin-based ones.


[pt-br]
Busquei diferentes opções de plugins para criação de slugs, contudo eles em geral não consideram os caracteres que usamos em português, como acentos, cedilha, etc.
Então decidi criar meu próprio plugin e disponibilizar gratuitamente para a comunidade.

Aí que entra o plugin Slugify Free.

Basta instalar e utilizar a ação Slugify no backend workflow - deve lidar bem com qualquer texto em português ou outras línguas latinas.

1 Like

This doesn’t work for thai language

Hi there, @boston85719.
Sorry about that, but it never came to my mind the thai language and I can’t even think of text examples to test it out. Could you please send some examples, so I could try to figure it out?

If you do, send the original text and the desired output (as seen that I won’t be able to determine what’s right or wrong by myself).

@falecom1 no worries, no other plugin does it either

Here is example of the Thai Script (it has Thai and English as some English is not translatable)

ดูเชิงลึกเกี่ยวกับสายพันธุ์กัญชาของ Pineapple Express

desired output would be

ดูเชิงลึกเกี่ยวกับสายพันธุ์กัญชาของ-pineapple-express

Thai script does not use spaces between words

What I get from all plugins is -pineapple-express

bubble built in set things slug does it correctly, but it is not what I want to use as I have a need for multiple languages to each have their own ‘slug’ in order to be a real multilanguage app

Thanks for your example text.
Just released a updated version, with a new action just for Thai language. Couldn’t make it work for latin-based and Thai in the same function.

Thanks to this repo I could manage to achieve that.

Update your plugin and try it out with the new action (Slug Thai) and see if it works as expected.

@falecom1 Thank you for the effort. I just tested this out and it seems to work, but there is an issue, which I don’t know is avoidable or not. The slugify output is replacing certain characters.

For example the ชิ became ช which does actually change meaning.

Below you can see the translation differences

First is slug from the plugin output

Second is from output of Bubble built in set a thing slug feature

Below is the english language slug

an-in-depth-look-at-the-pineapple-express-cannabis-strain

Thai language doesn’t translate very well into English on the whole.

Man… I’m really lost here. These characters look so indecipherable to me that it is hard to even try to grasp this problem.
But I’ll do some more research and try to figure it out – just hang on tight.

1 Like

It’s there, my friend @boston85719 !
Surprisingly I’ve found a patch to that issue on the original repo.
Tested with your example text and the characters are the same after the slugify (and it translate the same as well).

Hope it save you some time.

Oh this is Awesome! Thank you so much for putting this together. Definitely will save time and app resources to implement what I needed from this. As I have to have slugs for both English and Thai for everything, and the app has a lot of everything (articles, products, shops etc.) this will be put to heavy use.

Much appreciated. :grin:

1 Like