跳过导航

標籤: 

本主题包含 0 則回覆 ,有 1 嗓音 。

最后由 adrienR-5 7 months, 1 weeks前 更新。

协助者:: Waqas Bin Hasan.

作者 文章
2 7 月, 2024 于 8:54 上午 #15873646

adrienR-5

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?