Multilanguage support in AppDesigner GUI

34 visualizaciones (últimos 30 días)
Nikolay
Nikolay el 20 de Oct. de 2022
Comentada: Nikolay el 24 de Oct. de 2022
I am wondering if there is a standard way to implement the multilanguage suppport for the AppDesigner-based GUI. I need to write the program that will allow user to switch between the languages in the GUI menu.

Respuesta aceptada

Eric Delgado
Eric Delgado el 23 de Oct. de 2022
Hey @Nikolay, you could use an excel file as a dictionary (or a json file) and you should fill "Tag" property of each object subject to language change... see app attached!
% Main part
for ii = 1:height(app.Dictionary)
h = findall(groot, 'Tag', app.Dictionary.TAG{ii});
switch app.Dictionary.PROPERTY{ii}
case "Text"
set(h, app.Dictionary.PROPERTY{ii}, textArray{ii});
case "Items"
set(h, app.Dictionary.PROPERTY{ii}, strsplit(textArray{ii}, ';'));
h.Value = h.Items{idx};
end
end
The result...

Más respuestas (0)

Categorías

Más información sobre Data Import and Analysis en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by