//
//  iLocalizeCocos2dx.h
//  Loxily Localize Cocos2dx SDK
//

#ifndef iLocalizeCocos2dx_h
#define iLocalizeCocos2dx_h

#include "cocos2d.h"
#include <string>
#include "iLocalizeConfig.h"

using namespace std;

typedef void (*TranslationPreparedCallback)(bool success);

class iLocalizeCocos2dx {
public:
    static void init(string appKey, string language, bool isInternationalizing);

    static void init(string appKey, string language, bool isInternationalizing, bool isDebug);
    static void setTranslationPreparedCallback(TranslationPreparedCallback callback);

    static string getString(string code);
    static string getString(string code, string defaultString);

    static void updateUserInfo(UserConfig config);
    static void evaluateString(string code);

    static void updateLanguage(string language);
    static void setLogEnable(bool enable);


#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
    static string getPageString(string pageId, string code);
    static string getPageString(string pageId, string code, string defaultString);
    static void setScreenshotPageId(string pageId);
    static void showFloatingWindow();
#endif

};

#endif
