Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for transliteration from Latin to Cyrillic script #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

turanjanin
Copy link

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