{"id":15384095,"url":"https://github.com/jawish/rtlthis","last_synced_at":"2025-07-08T21:32:57.356Z","repository":{"id":35555811,"uuid":"39827570","full_name":"jawish/rtlthis","owner":"jawish","description":"Automatically detect and decorate all RTL language script to easily set fonts and language direction.","archived":false,"fork":false,"pushed_at":"2015-07-28T10:40:49.000Z","size":136,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-24T03:27:47.002Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jawish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-28T10:25:15.000Z","updated_at":"2021-07-13T13:08:43.000Z","dependencies_parsed_at":"2022-09-17T20:50:15.804Z","dependency_job_id":null,"html_url":"https://github.com/jawish/rtlthis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jawish%2Frtlthis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jawish%2Frtlthis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jawish%2Frtlthis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jawish%2Frtlthis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jawish","download_url":"https://codeload.github.com/jawish/rtlthis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225465305,"owners_count":17478520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T14:40:36.217Z","updated_at":"2024-11-20T03:53:36.232Z","avatar_url":"https://github.com/jawish.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rtlThis\nAutomatically detect and decorate all RTL language script to easily set fonts and language direction.\n\n## Installation\n1. Add the script to the page.\n\n```html\n\u003cscript src=\"rtlthis.js\"\u003e\u003c/script\u003e\n```\n\n2. Run the script on desired elements using the .run(queryOrElem) method.\n\n```html\n\u003cscript type=\"text/javascript\"\u003e\nrtlThis.run('body');\n\u003c/script\u003e\n```\n\n3. Setup the CSS.\nrtlThis will add the desired class to the decorating tag when run. This can be then targetted with CSS for setting font, text direction and other settings.\n\nExample to style Dhivehi and Arabic text:\n```css\n[class*=\"rtl-\"] {\n\tdirection: rtl;\n\tunicode-bidi: inherit;\n}\n.rtl-div {\n\tfont-family: 'MV Faseyha';\n\tfont-size: 18px;\n}\n.rtl-ara {\n\tfont-family: 'Arial MS Unicode','Simplified Arabic', 'Andale sans';\n\tfont-size: 18px;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjawish%2Frtlthis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjawish%2Frtlthis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjawish%2Frtlthis/lists"}