Skip to content

Commit e8d97f3

Browse files
committed
add support for rtl languages
fixes #838
1 parent 8b6f9ea commit e8d97f3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Allow data URLs in markdown images. This allows embedding base64 encoded images in any markdown field.
1616
- see [configuration.md](./configuration.md) for more details.
1717
- In the shell component, setting the `footer` parameter to the empty string (`''`) will now completely hide the footer, instead of showing the default one
18+
- New configuration option: `rtl` to display the page in right-to-left mode. This can be used to display Arabic, Hebrew, Persian, etc.
1819

1920
## 0.33.1 (2025-02-25)
2021

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,6 +1164,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
11641164
('font', 'Specifies the font to be used for displaying text, which can be a valid font name from fonts.google.com or the path to a local WOFF2 font file starting with a slash (e.g., "/fonts/MyLocalFont.woff2").', 'TEXT', TRUE, TRUE),
11651165
('font_size', 'Font size on the page, in pixels. Set to 18 by default.', 'INTEGER', TRUE, TRUE),
11661166
('language', 'The language of the page. This can be used by search engines and screen readers to determine in which language the page is written.', 'TEXT', TRUE, TRUE),
1167+
('rtl', 'Whether the page should be displayed in right-to-left mode. Used to display Arabic, Hebrew, Persian, etc.', 'BOOLEAN', TRUE, TRUE),
11671168
('refresh', 'Number of seconds after which the page should refresh. This can be useful to display dynamic content that updates automatically.', 'INTEGER', TRUE, TRUE),
11681169
('sidebar', 'Whether the menu defined by menu_item should be displayed on the left side of the page instead of the top. Introduced in v0.27.', 'BOOLEAN', TRUE, TRUE),
11691170
('sidebar_theme', 'Used with sidebar property, It can be set to "dark" to exclusively set the sidebar into dark theme.', 'BOOLEAN', TRUE, TRUE),

sqlpage/templates/shell.handlebars

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<!DOCTYPE html>
2-
<html lang="{{language}}" style="font-size: {{default font_size 18}}px" {{#if class}}class="{{class}}" {{/if}}>
2+
<html
3+
lang="{{language}}"
4+
style="font-size: {{default font_size 18}}px"
5+
{{#if class}}class="{{class}}" {{/if}}
6+
{{~#if rtl}}dir="rtl" {{/if~}}
7+
>
38
<head>
49
<meta charset="utf-8" />
510
<title>{{default title "SQLPage"}}</title>

0 commit comments

Comments
 (0)