Synchronic Digraphia


(Tomo Vukasović) #1

Since Serbian language has two writing systems for the same language. Latin and Cyrillic. We decided to create simple auto “translator”. Well we didn’t want to completely replace Cyrillic with Latin, but offer choice of converting to Latin through hover effect (it maybe needs something showing that text is convertible). If someone has better approach please share.

Why?
Not everyone understands Cyrillic letters while everyone understands Latin.

Let me demonstrate what we had in mind:

*click on image to see screencast


(Tomo Vukasović) #2

We have done something simple, but it works. Check it live:

http://www.revolucionar.com/t/topic/1224


(Jeff Atwood) #3

This is interesting; what percentage of Serbians can read latin characters but not Cyrillic?


(Tomo Vukasović) #4

All Serbians read both Cyrillic and Latin fluently. However, our discourse instance is planned to target all Balkan countries: Croatia, Serbia, Bosnia, Montenegro, Macedonia and Slovenia. They all understand Latin version of Serbo-Croatian language.


#5

The Digraphia seems interesting, good luck with the project! :smile:


(Erlend Sogge Heggen) #6

Very interesting problem. Wouldn’t a simple front-end (i.e. per-user) site setting be simpler though? Like a Latin/Cyrillic selector akin to a language selector.


#7

For website translation (Discourse in this example) yes, it’s almost a standard here in Serbia to make a site in Cyrillic and provide a transliteration function for Latin script, if you want both scripts. That way you maintain only one translation and have both scripts on your site (because Cyrillic translates to Latin one-to-one while Latin characters can not “for sure” be translated to Cyrillic one-to-one).

But this is not the problem here as we don’t want Cyrillic forum interface (for now), as @Webinsane pointed out, everyone can read Latin anyway. The problem is some users write their posts in Cyrillic so majority of other members can’t read it. The solution is either to make something like this or force transliteration prior to displaying posts (and not prior to saving them, so OP can still edit it in Cyrillic). But if you force Latin you may violate someone’s right to write in his native script (or just hurt his feelings). The way we did this, it’s still Cyrillic, but it changes to Latin when you hover your mouse on the elements which contain Cyrillic script. Maybe mouse over event wasn’t the right choice (maybe it should offer a clickable option below the post to transliterate it), but this was just a quick fix which I wrote in 30 minutes using only JavaScript (jQuery).

p.s. Wordpress for example, officially provides “srlat.php” plugin with Serbian version and only Cyrillic translation.


(Kane York) #8

I think this could be done with a composer plugin using Discourse.Markdown, which would result in the following:

  • Author can edit their post in Cryillic
  • Author can ALSO see the Latin result in the live preview
  • Everyone else sees Latin

How’s that sound?


(Sam Saffron) #9

To me this does not feel like the “right” solution, I think a simple user pref for “desired charset” is best here. At the end of the day users will have a pref, either they want everything in cyrillic or latin.


(Tomo Vukasović) #10

I like things that are instant on the fly that will be used by everybody. That is why I was against automatic conversion. Plus if we set by default to be Latin then no Cyrillic will be visible. I assume then setting must be set by default to none/both, Latin for only Latin and Cyrillic for only Cyrillic. Once I complete Latin Serbian/Bosnian/Croatian translation it should be simple to convert Discourse translation to Cyrillic.


(Dave McClure) #11

Just to be clear, @sam is suggesting this should be a user preference, not a system preference.

Even if you allow users to set a default, you could still keep the toggle so they could still view the Cyrillic on demand. The toggle also works well for anonymous viewers.


(Dražen Lučanin) #12

Is this auto translator plugin available online somewhere? I’d like to use it for our tech forum as well. @Webinsane have you perhaps published it on GitHub or somewhere like that? The previous links are dead now.

Or has there maybe been some progress with this “desired charset” solution @sam mentioned that we could use instead?


(Tomo Vukasović) #13

Nope that instance of discourse is down :frowning: