This thread is resolved. Here is a description of the problem and solution.
Problem: How can I get the Language URL format in use in php?
Solution: We can use the following code to get the Language URL format. The *wpml_setting* API call will return 1 if the Language URL format option is *Different languages in directories* and 3 if the option is *Language name added as a parameter*.
$is_wpml_configured = apply_filters( 'wpml_setting', 0, 'language_negotiation_type' );
Relevant Documentation: https://wpml.org/wpml-hook/wpml_setting/
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 2 replies, has 2 voices.
Last updated by carlosS-40 4 years, 12 months ago.
Assisted by: Bigul.