c++qtqt5.6

How to use Ampersand string using in Language translation in QT


QString = "Command && Profile";

ru.ts file

<context>
<message>
        <source>Command &amp; Profile</source>
        <translation>Команда и профиль</translation>
    </message>
</context>

Using translation this method will not working.. This scenario how to translate this.. Otherwise any other method is to do this translation.


Solution

  • You have to write &amp;&amp; in .ts file:

    <context>
        <message>
            <source>Command &amp;&amp; Profile</source>
            <translation>Команда и профиль</translation>
        </message>
    </context>