Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Michael Meeks píše v Út 22. 05. 2012 v 17:57 +0100:
      Normally for this a pseudo-printf format would be used so use a % or $
magic in the string to be replaced. For an example of that:

String STR_RECOVER_QUERY
{
    Text [ en-US ] = "Should the file \"$1\" be restored?" ;
};

You might find a working example of substitution in the commit
http://cgit.freedesktop.org/libreoffice/core/commit/?id=8c7ca43f690b12043d78a698f622eb565f305782

The important part is adding %ABOUTBOXPRODUCTVERSIONSUFFIX into
cui/source/dialogs/about.src and calling

rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSIONSUFFIX",
rAboutBoxVersionSuffix );

in desktop/source/app/app.cxx


Note that this only describes how to modify existing string and how to
replace the value. If you want to add new GUI element, you need to
define also an ID in the related .hrc file, call ResId() to get the
localized string, ...


Best Regards,
Petr


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.