Skip to main content
improved formatting
Source Link
Mike Madern
  • 3.9k
  • 3
  • 25
  • 33

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 .po file

  1. download poedit
  2. File > new catalog
  3. In the first tab, fill in the fields, the most important ones are
  • Language, in your case: arar
  • Plural Forms, set this to: nplurals=2; plural=n == 1 ? 0 : 1;nplurals=2; plural=n == 1 ? 0 : 1;
  1. In the second tab, set the path to: ../../ and add path: ..
  2. In the last tab, add the following values:
  • ____
  • _e_e
  • _n_n
  • _x:2c,1_x:2c,1
  • _xn_xn
  • _ex_ex
  • esc_attr__esc_attr__
  • esc_attr_eesc_attr_e
  • esc_attr_xesc_attr_x
  • esc_html__esc_html__
  • esc_html_eesc_html_e
  • esc_html_xesc_html_x
  • _n_noop_n_noop
  • _nx_noop_nx_noop
  • translate_nooped_pluraltranslate_nooped_plural
  1. Save the catalog in your themes' languages directory as: ar.po
  2. Poedit will search for translations and then show them
  3. Translate the strings and save the file.

This .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' );

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 .po file

  1. download poedit
  2. File > new catalog
  3. In the first tab, fill in the fields, the most important ones are
  • Language, in your case: ar
  • Plural Forms, set this to: nplurals=2; plural=n == 1 ? 0 : 1;
  1. In the second tab, set the path to: ../ and add path: .
  2. In the last tab, add the following values:
  • __
  • _e
  • _n
  • _x:2c,1
  • _xn
  • _ex
  • esc_attr__
  • esc_attr_e
  • esc_attr_x
  • esc_html__
  • esc_html_e
  • esc_html_x
  • _n_noop
  • _nx_noop
  • translate_nooped_plural
  1. Save the catalog in your themes' languages directory as: ar.po
  2. Poedit will search for translations and then show them
  3. Translate the strings and save the file.

This .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' );

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 .po file

  1. download poedit
  2. File > new catalog
  3. In the first tab, fill in the fields, the most important ones are
  • Language, in your case: ar
  • Plural Forms, set this to: nplurals=2; plural=n == 1 ? 0 : 1;
  1. In the second tab, set the path to: ../ and add path: .
  2. In the last tab, add the following values:
  • __
  • _e
  • _n
  • _x:2c,1
  • _xn
  • _ex
  • esc_attr__
  • esc_attr_e
  • esc_attr_x
  • esc_html__
  • esc_html_e
  • esc_html_x
  • _n_noop
  • _nx_noop
  • translate_nooped_plural
  1. Save the catalog in your themes' languages directory as: ar.po
  2. Poedit will search for translations and then show them
  3. Translate the strings and save the file.

This .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' );
Source Link
Mike Madern
  • 3.9k
  • 3
  • 25
  • 33

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 .po file

  1. download poedit
  2. File > new catalog
  3. In the first tab, fill in the fields, the most important ones are
  • Language, in your case: ar
  • Plural Forms, set this to: nplurals=2; plural=n == 1 ? 0 : 1;
  1. In the second tab, set the path to: ../ and add path: .
  2. In the last tab, add the following values:
  • __
  • _e
  • _n
  • _x:2c,1
  • _xn
  • _ex
  • esc_attr__
  • esc_attr_e
  • esc_attr_x
  • esc_html__
  • esc_html_e
  • esc_html_x
  • _n_noop
  • _nx_noop
  • translate_nooped_plural
  1. Save the catalog in your themes' languages directory as: ar.po
  2. Poedit will search for translations and then show them
  3. Translate the strings and save the file.

This .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' );