We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question
0

Where Can I check if the UI locale uses RTL (Right-to-Left) ?

asked 2020-06-17 14:39:04 +0200

… in order to display dialog controls according to RTL reading context

edit retag flag offensive close merge delete

Comments

I'm afraid, this information is not exposed :-( - you likely need to create a list of locales with their RTL statuses, and compare the UI language (from org.openoffice.Setup/L10N/ooLocale, with fallback to org.openoffice.System/L10N/UILocale (?))... and come with an enhancement request ;-)

Possibly @erAck has a better idea?

Mike Kaganski gravatar imageMike Kaganski ( 2020-06-17 15:19:19 +0200 )edit

Nah, AFAIK there's no such thing exposed to the API.

erAck gravatar imageerAck ( 2020-06-17 21:28:50 +0200 )edit

However, aren't dialog controls already automatically displayed RTL if the UI language is RTL? Or does that not happen for extension dialogs? Which I'd consider either a bug or a feature to be implemented..

erAck gravatar imageerAck ( 2020-06-17 22:01:20 +0200 )edit

My intent is to shift the layout of controls in a dynamic dialog, it's not related to controls RTL behaviour yet …

LibreOfficiant gravatar imageLibreOfficiant ( 2020-07-03 10:16:24 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2020-06-17 21:57:04 +0200

erAck gravatar image

I can only give you a list of currently supported RTL languages:

ar-* Arabic
he-* Hebrew
yi-* Yiddish
ur-* Urdu
fa-* Farsi
ks-Arab-* Kashmiri Arabic script
sd-* (sd-Deva-*, sd-Arab-*) Sindhi
ug-* Uighur
ky-* Kyrgyz
nqo-* Nko
ckb-*, sdh-*, ku-Arab-* Kurdish Arabic script
hu-Hung-* Hungarian Rovas
ms-Arab-* Malay Arabic script

Hope that helps.

edit flag offensive delete link more

Comments

Thanks for that list

LibreOfficiant gravatar imageLibreOfficiant ( 2020-07-03 10:17:14 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-06-17 14:39:04 +0200

Seen: 123 times

Last updated: Jun 17 '20