Multilanguage support in AppDesigner GUI

13 ビュー (過去 30 日間)
Nikolay
Nikolay 2022 年 10 月 20 日
コメント済み: Nikolay 2022 年 10 月 24 日
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.

採用された回答

Eric Delgado
Eric Delgado 2022 年 10 月 23 日
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...
  1 件のコメント
Nikolay
Nikolay 2022 年 10 月 24 日
Thank you, Eric!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Mobile についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by