English 中文(简体)
带有 “%%”符号的字符串资源
原标题:String resource with "%" symbol

我拥有字符串xml 和表演本地化。

在字符串标签中写入内容时,我注意到在第二个 "% " 符号之后附加文本会发生错误。

<string name="result_unlikely">Improbable 20% to 50%</string>//working

<string name="result_unlikely">Improbable 20% to 50% required</string>//not working

任何想法吗?

< parger > 注 < note : 我知道我可以写它运行时间, 但如前所述, 我正在实施本地化, 所以使用字符串. xml 效果要好得多 。

最佳回答

解决了

通过添加 formated="false" 问题解决。

<string name="result_unlikely" formatted="false">Improbable 20% to 50% required</string>
问题回答

暂无回答




相关问题
how to use DynamicResource in the code behind?

I d like to be able to set a property to a dynamic resource programmatically. myControl.Property = this.Resource[key] is not a valid response, since if the resource with the key key is replaced, ...

PHP - Foreach loops and ressources

I m using a foreach loop to process a large set of items, unfortunately it s using alot of memory. (probably because It s doing a copy of the array). Apparently there is a way to save some memory with ...

C# Play MP3 from Resources with MCI or WMP control?

I have a MP3 file in my Resources of Visual C#. I m trying to find out if there is a way I can play this MP3 in a Windows Media Player control or with MCI, I m not particular. I m fairly new to C#. ...

Convert files of any types to a file with c strings

Please suggest a small command-line utility (for Windows) to convert files from particular directory to a valid c file. Maybe it can be done just with batch commands? The resulting file should look ...

How to sort ResourceSet in C#

I have a resource file named filetypes.resx. Some how I figured out to bind the resource values to dropdownlist, but I don t know how to sort the values of ResourceSet. Here is what I did so far, ...

热门标签