Skip to content

Add support for transliteration from Latin to Cyrillic script - #4

Open
turanjanin wants to merge 2 commits into
oblakstudio:masterfrom
turanjanin:cyrillic-transliteration
Open

Add support for transliteration from Latin to Cyrillic script#4
turanjanin wants to merge 2 commits into
oblakstudio:masterfrom
turanjanin:cyrillic-transliteration

Conversation

@turanjanin

Copy link
Copy Markdown

This pull request adds support for creating Cyrillic version of a website which uses Latin as a main script. Even though this may not be original purpose of SrbTransLatin, I thought that it might be nice addition to already existing feature set. If you disagree, this might be a good starting point for new plugin - SrbTransCyrillic :)

In order to accomplish this, I've had to add new option on the settings page - "origin script". By default, it is set to "Cyrillic" and if you don't change that value, plugin will behave exactly the same as before.

However, if you choose to change this value to "Latin", the plugin will transliterate the whole page to Cyrillic if users select Cyrillic script. Since we are dealing with the raw HTML, I've used already included simplehtmldom/simplehtmldom library to extract and transliterate only the textual part of the page, leaving HTML tags, CSS and JS parts in their original form. This part still needs to be tested with various pages before we can be sure that it doesn't cause unexpected issues.

Finally, if you decide to merge this PR, we need to check transliteration of RSS and other feeds and, possibly, introduce additional shortcodes to achieve feature-parity with original extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant