struct CCL::ITranslationTable
Overview
String translation table. More…
#include <itranslationtable.h> struct ITranslationTable: public CCL::IUnknown { // methods virtual tresult CCL_API addVariable (StringID name, StringRef text) = 0; virtual tresult CCL_API addString (StringID scope, StringID key, StringRef text) = 0; virtual tresult CCL_API loadStrings ( IStream& stream, ITranslationTableHook* hook = nullptr ) = 0; virtual tresult CCL_API getString (String& result, StringID scope, StringID key) const = 0; virtual tresult CCL_API addStringWithUnicodeKey ( StringID scope, StringRef unicodeKey, StringRef text ) = 0; virtual tresult CCL_API getStringWithUnicodeKey ( String& result, StringID scope, StringRef unicodeKey ) const = 0; virtual tresult CCL_API saveStrings (IStream& stream, tbool isTemplate) const = 0; };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0;
Detailed Documentation
String translation table.
Methods
virtual tresult CCL_API addVariable (StringID name, StringRef text) = 0
Add variable for translation string processing, specified by key and value.
Variables must be defined before translations are loaded!
virtual tresult CCL_API addString (StringID scope, StringID key, StringRef text) = 0
Add a single translation.
Key and scope name must be ASCII!
virtual tresult CCL_API loadStrings ( IStream& stream, ITranslationTableHook* hook = nullptr ) = 0
Load string translations from GNU MO (Machine Object) stream.
virtual tresult CCL_API getString (String& result, StringID scope, StringID key) const = 0
Get translated string for key in specified scope.
Key and scope name must be ASCII!
virtual tresult CCL_API addStringWithUnicodeKey ( StringID scope, StringRef unicodeKey, StringRef text ) = 0
Add a single translation.
Non-ASCII characters in key are replaced with XML entities.
virtual tresult CCL_API getStringWithUnicodeKey ( String& result, StringID scope, StringRef unicodeKey ) const = 0
Get translated string for Unicode key.
Non-ASCII characters in key are replaced with XML entities.
virtual tresult CCL_API saveStrings (IStream& stream, tbool isTemplate) const = 0
Save string translations to GNU PO (Portable Object) or POT (Portable Object Template).