I would like to use polyglossia to be able to write in arabic and english on the following code beautiful section styles
It compiles without errors, but the output doesn't show any Arabic language.
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage[explicit]{titlesec}
\usepackage{soul}
\definecolor{titleblue}{HTML}{4a7aa4}
\title{Probability}
\author{Educ}
\date{\today}
\newbox\TitleUnderlineTestBox
\newcommand*\TitleUnderline[1]
{%
\bgroup
\setbox\TitleUnderlineTestBox\hbox{\colorbox{titleblue}\strut}%
\setul{\dimexpr\dp\TitleUnderlineTestBox-.3ex\relax}{.3ex}%
\ul{#1}%
\egroup
}
\newcommand*\SectionNumberBox[1]
{%
\colorbox{titleblue}
{%
\makebox[2.5em][c]
{%
\color{white}%
\strut
\csname the#1\endcsname
}%
}%
\TitleUnderline{\ \ \ }%
}
\titleformat{\section}
{\Large\bfseries\sffamily\color{titleblue}}
{\SectionNumberBox{section}}
{0pt}
{\TitleUnderline{#1}}
\titleformat{\subsection}
{\large\bfseries\sffamily\color{titleblue}}
{\SectionNumberBox{subsection}}
{0pt}
{\TitleUnderline{#1}}
\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2,AutoFakeSlant=-0.02]{Traditional Arabic}
\setsansfont[Script=Arabic,Scale=1.5]{Traditional Arabic}
\begin{document}
\maketitle
\newpage
\chapter{الاحتمالات}
\section{الاحتمالات الحزء الاول }
\subsection{الاحتمالات الحزء الاول}
\subsection{الاحتمالات الحزء الاول}
\section{الاحتمالات الحزء الاول الاحتمالات الحزء الاول}
\section
{الاحتمالات الحزء الاول and text in English }
\end{document}

