duanji1026 2019-04-29 15:58
浏览 56

Wordpress - WooCommerce Polylang Integration - 仅使用一种语言的产品

As the question, you can guess, I'm building my own theme for Woccommerce, the store is a multilingual store, and after carefully creating all the pages in two languages, I have to take care of the products, to do this, I use a plugin that is who loves: WooCommerce Polylang Integration

Which just like Polylang, does the same job that is it allows the user to specify a product and adapt the same in x, languages ​​that the user has previously chosen.

But now I am faced with a problem!

I have two languages, selected in my Woocommerce store. If a product is not available in a language, when I go to that single product and click on the language to which that product is not associated with a product, it will bring me back home

My question:

How do I specify the current product flag if second language translation is not available for that product

Simplified: if I have a product with only one language, how can I only show the flag of the language associated with that product

Echo flags:

<?php pll_the_languages(array('show_flags'=>1,'show_names'=>0)); ?>
  • 写回答

1条回答 默认 最新

  • dongqi6486 2019-08-18 08:45
    关注

    There is an option on the Language widget that might help:
    enter image description here

    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP