class CCL::LocalString

Helper class to define translated strings statically.

#include <translation.h>

class LocalString
{
public:
    // structs

    struct BeginScope;
    struct EndScope;
    struct EnglishCorrection;

    // construction

    LocalString (const char* key);

    // methods

    const char* getKey () const;
    StringRef getText (const ITranslationTable* altTable = nullptr) const;
    operator StringRef () const;
    static bool hasTable ();
    static ITranslationTable* getTable ();
    static void setTable (ITranslationTable* table);
    static void tableDestroyed ();
    static String translate (StringID scope, StringRef keyString);
    static String translate (StringID scope, StringID keyString);
    static void addCorrections (const EnglishCorrection corrections [], int count);
};