you'll have to store all the 'strings' in a external file, or in the same file but it's going to be huge: here's an idea of how to do it, as simple as 1,2,3:
1. Create a GUI with default text values and tag properties considering previous tags:
f= figure ;
h1 = uicontrol(f,'style','pushbutton','position',[10 10 200 20],...
'tag','txtOne','String','default text') ;
h2 = uicontrol(f,'style','text','position',[10 35 200 20],...
'tag','txtother','String','default text2') ;
2. Create a function to change the 'String' property for all elements
function changeLan(figureHandle,lanIndex)
tags = {'txtOne','txtother'} ;
strs{1} = {'My text', 'Other text'} ;
strs{2} = {'Mi texto', 'otro texto'} ;
for i = 1:length(tags)
handle = findobj(f,'tag',tags{i}) ;
set(handle,'String',strs{lanIndex}{i});
end
end
3. call the function to change the language:
changeLan(f,1);
changeLan(f,2);
Hope it will help you! :)