In Omeka site, I have a multi language content. Most of the content is RTL languages. Can anyone guide how can I enable RTL interface in Roy Theme public view?
Are you looking to make the whole page RTL, or just specific parts?
You’d be looking at editing the theme no matter what. A first step if you’re doing the whole page would be to add
dir="rtl" to the
<html> tag at the top of the common/header.php file.
if i do the above, the entire page changes to RTL.
on pages of some items, I have content in LTR language. Can I specify LTR for those item pages only?
Do you have some piece of metadata that uniquely and reliably indicates that an item is in an RTL language? You’d need something for the theme to look for if the default appearance isn’t to your liking.
yes, “Language” metadata shows RTL language name.
Can you show a screenshot (or a link to the actual page) of the results you’re getting now, and a description of how you want it to look instead?
To some degree the browsers usually lay out RTL text correctly, and what specifically has to be done to make other things change can differ based on exactly what you’re looking to do.
I have not applied RTL as yet, but would like that Arabic item pages are displayed in RTL whereas English item pages are displayed in LTR.
I input Dublin Core “Language” field as either English or Arabic in metadata and it is also visible on item page to public.
My question was more directed toward whether you wanted the whole page or just a part of it switched to RTL. Since the “shell” of the page (the title, the navigation, header/footer, stuff like that) would be the same between those pages, I thought you might want to leave that the same and just flip something smaller and more focused around the actual metadata. The specifics of exactly what you’d have to do vary based on what exactly you’re looking for and what’s not working as you want right now, and I was trying to get at that.
Anyway, what you’re going to want to do is use `` to get the language and check if it’s set to Arabic.
if (get_current_record('item', false) && metadata('item', array('Dublin Core', 'Language')) === 'Arabic' ): // print an element with dir="rtl" else: // print an element with no dir attribute endif;