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 basic language install logic #201

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

barryceelen
Copy link

This adds a little rough on the edges support for installing languages. Attempts to fix #176
Some things worth considering:

  • Needs Fix: The plugin’s is_rtl method depends on a {language_code}.php file to be present in the languages folder. In that file it looks for a variable defining the text direction. Translations downloaded via the translations api don’t include this file. The only place I found the plugin’s text direction information being used is in the body class filter. This filter could either be adapted to use the WordPress text direction ‘detection’ or be removed completely, as a body class is set when the text direction is rtl,
  • Currently the user can only add languages available via the WordPress translation api (Or manually by adding translation files to the languages directory). Adding a language without a translation file present would be useful. Eg. I might want to have the admin just in English, but the front end in English, Dutch and German, whose translations would be covered by the Theme’s translation file.

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