Background of the issue:
We have an archive page displaying entries of a specific Custom Post Type (CPT). We want to add a select field where users can select the countries where these CPT entries are located. If an entry of this CPT is translated into Spanish, it means it's located in Spain. The select filter will redirect users to the translated page, allowing them to view those CPT in that language. We are currently using the filters wpml_current_language and wpml_active_languages. We then check if the page is translated into the active languages. If it is, we display the language in the select field.
Symptoms:
We want to display the country name instead of the language name in the select field.
Questions:
Is there a way to achieve displaying country names instead of language names with WPML?
Can we ensure the country names are translated depending on the current language?
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.