douling1936 2019-02-13 06:25
浏览 41

wordpress西班牙语语言代码返回false值

On my spanish Wordpress site, I'm using get_bloginfo('language') code for getting the language code. It's been working properly for last 2 years. Suddenly it returns the wrong value in the live environment. My local environment is working properly.

My code:

<?php echo get_bloginfo('language');?>

The above code return below values:
correct value : es-ES
wrong value : es

I need the result for es-ES

  • 写回答

1条回答 默认 最新

  • dqgg25493 2019-04-08 16:03
    关注

    Use this function:

    get_locale();
    

    Retrieves the current locale, in your case, es_ES, with low bar.

    More info -> https://developer.wordpress.org/reference/functions/get_locale/

    评论

报告相同问题?

悬赏问题

  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏