如何在gettext字符串中转义'%'字符? [英] How can I escape '%' character in a gettext string?
本文介绍了如何在gettext字符串中转义'%'字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 gettext 来翻译我的用户界面.我想将符号%
作为UI标题的一部分写在字符串中,但是由于它具有特殊的含义,因此无法按预期工作.如何摆脱百分号?
I use gettext to translate my user interface. I'd like to write symbol %
as part of a UI caption in a string, but since it has a special meaning, does not works as expected. How can I escape percent symbols?
推荐答案
使用%%
转义%.
这篇关于如何在gettext字符串中转义'%'字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文