*/}}
Browse Source

language set

YimingWu 3 months ago
parent
commit
7f50e54aae
1 changed files with 6 additions and 1 deletions
  1. 6 1
      resources/la_properties.c

+ 6 - 1
resources/la_properties.c

@@ -750,6 +750,11 @@ void laset_EnableGLDebug(void* unused, int e){ MAIN.EnableGLDebug=e; la_NotifyGL
 void laset_GLDebugSync(void* unused, int e){ MAIN.GLDebugSync=e; la_NotifyGLDebugChanges(); }
 void laset_GLDebugLevel(void* unused, int e){  MAIN.GLDebugLevel=e; la_NotifyGLDebugChanges(); }
 
+void laset_Language(void* unused, laTranslationNode* lang){
+    MAIN.Translation.CurrentLanguage = lang;
+    laRedrawAllWindows();
+}
+
 //void laget_DetachedPropContainerID(laProp* p, char * result) {
 //	strcpy(result, p->Detached->Container->Identifier);
 //}
@@ -1755,7 +1760,7 @@ void la_RegisterInternalProps(){
                 laAddEnumItem(ep, "no", "No", "Use original english string", 0);
                 laAddEnumItem(ep, "yes", "Yes", "Use translated string", 0);
             }
-            laAddSubGroup(p, "languages", "Language", "The language list in the software", "la_translation_language",0,0,laui_IdentifierOnly, offsetof(LA, Translation.CurrentLanguage), 0,0,0,0,0,0,offsetof(LA, Translation.Languages),LA_UDF_IGNORE);
+            laAddSubGroup(p, "languages", "Language", "The language list in the software", "la_translation_language",0,0,laui_IdentifierOnly, offsetof(LA, Translation.CurrentLanguage), 0,0,0,laset_Language,0,0,offsetof(LA, Translation.Languages),LA_UDF_IGNORE);
             
             laAddSubGroup(p, "resource_folders", "Resource Folders", "Folders to search for resources", "la_resource_folder",0,0,0,-1, 0,0,0,0,0,0,offsetof(LA, ResourceFolders), 0);
             ep = laAddEnumProperty(p, "manager_default_view", "UDF Manager Default View", "Prefer to show data blocks or files when saving", 0,0,0,0,0,offsetof(LA, ManagerDefaultView), 0,0,0,0,0,0,0,0,0,0);{