Greek language URL transliteration

סיכום מבוסס בינה מלאכותית

The discussion revolves around implementing Greek language URL transliteration in Discourse. jtsagata initially asked if copying the Greek transliteration rules from the rails-i18n gem into Discourse’s configuration would be enough to activate transliteration.

Falco suggested using Unicode slugs instead, but jtsagata clarified that transliteration is necessary for creating readable URLs.

gerhard pointed out that Discourse supports transliteration rules and suggested creating a pull request to add Greek transliteration rules similar to the existing Russian rules.

It was also mentioned that using plain Unicode URLs may not work due to browser and sharing platform limitations.

Ultimately, gerhard confirmed that adding the Greek transliteration rules file would be enough to activate transliteration, as Discourse does not use the rails-i18n gem.

I like to have the Greek language url for articles in latin. I have found the file

that seems that can do the job. Can i just put it under ‘config/locales/transliterate.el.yml’ or there is more to do?

Thanks in advance

We currently support unicode slugs under the setting slug generation method. Won’t enabling that be better for Greek support?

No i need transliteration. For example a URL like this

gives a URL like this %CE%BC%CE%B5-30-%CE%B5%CF%85%CF%81%CF%8E/83/19 where this is the greek με 30 ευρώ I want a URL like laptop-me-30-euro.

Before years i had create a gem to do exactly this alexandria | RubyGems.org | your community gem host, but i have lots of years to do Ruby codding and now it is obsolete. I have also used the friendly_id gem, but that was also years ago

I wonder if we should add new options here:

  • Transliteration: https://linux-user.gr/t/laptop-me-30-euro/83/18

  • Unicode: https://linux-user.gr/t/laptop-με-30-ευρώ/83/18

For some reason any unicode character in URL is translated like %CE%BC%CE%B5. You see the url in the browser as unicode text, and when you try copy it, you get it in encoded form.

Transliteration ( Transliteration - Wikipedia) is a way to have nice looking copy-able urls.

It will be nice to have that option, so what Hebrew, Chinese, German, Korean people believe ?

That’s because it’s URL encoded. We could use plain unicode like https://linux-user.gr/t/laptop-με-30-ευρώ/83/18 which you can click and it works.

Discourse supports transliteration rules. You can create a pull request and add something similar to transliterate.ru.yml for Greek.

I don’t think this will work. It highly depends on the browser if you get the encoded URL or not. See
URL Percent Encoding and Unicode (2010). Also, there was an issue with share dialog (Sharing link on Twitter doesn't work for encoded slugs) that prompted us to always use encoded URLs.

Damn Twitter.

I just tried with the IRI https://en.wiktionary.org/wiki/Ῥόδος and it works on:

  • Discourse
  • Facebook
  • Whatsapp
  • Telegram
  • Mattermost

Such a shame.

The rails-i18n gem have some good Greek transliteration rules. Discourse doesn’t use that standard gem?

My original question was if i copy that file to discourse what else is need it, in order to activate it.

We don’t use the rails-i18n gem. Adding that file will be enough.