# How can I write Persian in TeXstudio?

I want to write some Persian text in Texstudio. Which package should I use? I've heard about xepersian but I don't know how to use it. Any help would be appreciated.

\documentclass{article}
\usepackage{xepersian}
\settextfont{XB Roya}
\begin{document}
سلام!
\end{document}

• Welcome to TeX.SX! I guess, this has nothing to do with TeXStudio. Please show us something, you already have tried. We do not want to write everything from scratch. We don't know anything about your documentclass, how you compile it, and so on... Here are several threats on xepersian on this side. Please read them and tell us, what you don't understand. Did you run your code with XeLaTeX? – LaRiFaRi Jun 27 '14 at 15:37
• \documentclass{article} \usepackage{xepersian} \settextfont{XB Roya} \begin{document} سلام! \end{document} – zahraesb Jun 27 '14 at 16:05
• this is the code i wrote but an error occurs...what is xetex? – zahraesb Jun 27 '14 at 16:05
• Are you sure you have that font properly installed? I don’t have it, but your example works for me when I substitute IranNastaliq. – Thérèse Jun 27 '14 at 17:06
• See tex.stackexchange.com/q/3393/7883 for your question, “What is xetex?” Without xetex, your example cannot work. – Thérèse Jun 27 '14 at 17:35