Beamer XeTeX Right to Left

I am preparing Farsi slides in beamer which is a right to left language just like Hebrew. I have problems in the presentation which I briefly discuss:

• The TOC is left to right:

• The itemize can be forced to be right to left but it flushes to the left

• the frame title is shown in the left (this one is solved thanks to Mr.Vafa Khalighi the solution is \setbeamertemplate{frametitle}[default][right] command)

I found this web site very helpful to solve some problems, but the mentioned problems are still unresolved. the code is shown below

% XeLaTeX can use any Mac OS X font. See the setromanfont command below.
% Input to XeLaTeX is full Unicode, so Unicode characters can be typed directly into the source.

% The next lines tell TeXShop to typeset with xelatex, and to open and save the source with Unicode encoding.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[11pt]{beamer}
\usetheme{Warsaw}
\usecolortheme{crane}
%\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
%\geometry{letterpaper}                   % ... or a4paper or a5paper or ...
%\geometry{landscape}                % Activate for for rotated page geometry
%\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{amssymb}

% Will Robertson's fontspec.sty can be used to simplify font choices.
% To experiment, open /Applications/Font Book to examine the fonts provided on Mac OS X,
% and change "Hoefler Text" to any of these choices.
\TeXXeTstate=1
\usepackage{fontspec,xltxtra,xunicode}
\usepackage{bidi}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{X Zar}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{X Zar}
\setmonofont[Scale=MatchLowercase]{X Zar}
% \newfontfamily{\A}{X Zar}

\title{امنیت در اجرای همروند یک پروتکل احراز اصالت}
\author{یاسر صبحدل}
\date{\today}

\begin{document}
\frame{\titlepage}

\section[چارچوب]{}
\frame{\tableofcontents}

%\maketitle

% For many users, the previous commands will be enough.
% If you want to directly input Unicode, add an Input Menu or Keyboard to the menu bar
% using the International Panel in System Preferences.
% Unicode must be typeset using a font containing the appropriate characters.
% Remove the comment signs below for examples.

% \newfontfamily{\H}[Scale=0.9]{Lucida Grande}
% \newfontfamily{\J}[Scale=0.85]{Osaka}
\section{مقدمه}
\subsection{مروری بر پروتکلهای احراز اصالت}

\frame
{
\frametitle{محاسبات چندجانبه امن}
\begin{flushright}
از ۳ منظر مورد بررسی قرار می‌گیرد:\\
\end{flushright}
\setRL
{
\begin{itemize}
\item مورد اول
\item مورد دوم
\end{itemize}
}
}

\end{document}


BTW, I just didn't use the \newfontfamily command because the whole document is persian and only some words are english, so I changed the main font with a persian one.

-
Unfortunately there isn't good bidi support for beamer, which is what you would need to solve some of these problems. At least at the moment, the author of bidi doesn't seem willing to provide such support: bit.ly/faDMh0 –  Alan Munn Jan 17 '11 at 13:02
Side remark: You should additionally use the polyglossia package (though it won't help with your immediate problem, as it relies on bidi for rtl text). –  Caramdir Jan 17 '11 at 17:53
@user2716: nothing in therms of rtl (except that it includes bidi). But it does a variety of things that beamer does for standard latex (dates, numerals, etc.) –  Caramdir Jan 19 '11 at 6:22
@user2716 Vafa, perhaps my choice of words wasn't the best. I realise that the job is a big task, and since everything most of us do is done on a volunteer basis, fixing beamer isn't on your agenda at the moment. Everyone appreciates your work on bidi. –  Alan Munn Jan 20 '11 at 21:59
@user2716: Are you planning to fill in at least a bit of your profile at some point? (Suggestion: go to tex.stackexchange.com/users/edit/2716 and fill in something better than "user2716" for "Display Name".) –  SamB Jan 21 '11 at 19:01

Yasser, use bidipresentation class, at Parsilatex website, you can find useful template and help to achieve your aim.