Skip to content

A bookmarklet to fix some Right-To-Left layout issues in legacy apps

Notifications You must be signed in to change notification settings

dhis2/dhis2-rtl-bookmarklet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dhis2-rtl-bookmarklet

This bookmarklet improves support for right-to-left languages in DHIS2. For instructions on how to use and install, go to: https://dhis2.github.io/dhis2-rtl-bookmarklet/.

rtl_bookmarklet.mov
Before After
image image

Add Your own styles

If you prefer to not use the syles in this repo, and upload your own CSS fixes for RTL, then follow the steps below:

  1. Locally on your machine, create a file named style.css and add - as an example - this CSS snippet to it:
.formSection {
  direction: rtl !important;
}

or alternatively download style.css from this repo which fixes many of the rtl issues, and change/add as you see fit.

  1. Open a terminal, and navigate to where the style.css file is located. Then Run the curl command described in this documentation link. In your case, the command will be:
curl --data-binary @style.css "https://url_to_dhis_2_instance/api/files/style"  -H "Content-Type:text/css" -u user:password

changing url_to_dhis_2_instance, user and password to the values from your DHIS2 instance.

  1. In the browser, go to https://url_to_dhis_2_instance/api/files/style and you should be able to see the CSS file you just uploaded.

  2. Then go to a form, and do a hard refresh ("Empty cache and hard reload" in Chrome), and the forms should then display right-to-left, with the styles applied to it. It's important to do a hard refresh, as otherwise the previous CSS will be cached and served instead.

About

A bookmarklet to fix some Right-To-Left layout issues in legacy apps

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published