Site icon Qaisar Satti's Blogs

WooCommerce Get All Language WPML

Today’s topic is referring to the WooCommerce Get All Languages WPML Module. You can get all languages on WooCommerce while using the WPML module. The example below will list all the available languages. However, keep in mind that this code will work with the already installed WPML module.

Below is an example:

$multilingual = icl_get_languages('skip_missing=0');

foreach ( $multilingual as  $multilingual_site => $lanvalue ) {
   echo esc_attr( $lanvalue['language_code'] );
   echo esc_attr( $lanvalue['translated_name']);

}
Exit mobile version