First, read this Codex page about translating WordPress.
You have to create a language file to put into your language directory, do this by following the next steps:
I assume you want to use poedit since you talk about a
- download poedit
- File > new catalog
- In the first tab, fill in the fields, the most important ones are
- Language, in your case:
- Plural Forms, set this to:
nplurals=2; plural=n == 1 ? 0 : 1;
- In the second tab, set the path to:
../ and add path:
- In the last tab, add the following values:
- Save the catalog in your themes' languages directory as: ar.po
- Poedit will search for translations and then show them
- Translate the strings and save the file.
.po file will contain all your translated strings wich WordPress will use to translate your added code.
To display WordPress itself in your language, download the language files from the Codex page and add them to your wordpress languages directory.
Then, in your
wp-config.php, set the following line:
define( 'WPLANG', 'ar' );