#include "MainController.h"
#include <efl_extension.h>
+#include <utils_i18n.h>
+#include <system_settings.h>
using namespace TaskMngr;
return ui_app_main(argc, argv, &cbs, this);
}
+void App::updateCharacterOrientation()
+{
+ char *lang = nullptr;
+ system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &lang);
+ if (lang) {
+ LOG("Language: ", lang);
+ elm_language_set(lang);
+ i18n_ulocale_layout_type_e layout = I18N_ULOCALE_LAYOUT_UNKNOWN;
+ if (i18n_ulocale_get_character_orientation(lang, &layout) == I18N_ERROR_NONE) {
+ if (layout == I18N_ULOCALE_LAYOUT_LTR) {
+ elm_config_mirrored_set(false);
+ } else if (layout == I18N_ULOCALE_LAYOUT_RTL) {
+ elm_config_mirrored_set(true);
+ } else {
+ LOG_ERROR("Unsupported character orientation type: ", layout);
+ }
+ }
+ free(lang);
+ }
+}
+
bool App::onCreate()
{
TRACE;
elm_app_base_scale_set(1.3);
elm_config_accel_preference_set("3d");
ecore_animator_frametime_set(1 / maxFps);
+ updateCharacterOrientation();
m_pWindow = new Window;
m_pWindow->show();
void App::onLanguageChanged(app_event_info_h appEvent)
{
TRACE;
+ updateCharacterOrientation();
}
void App::onLowBattery(app_event_info_h appEvent)