<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/246489</link>
    <title>MATLAB Central Newsreader - Switching 2 languages in a guide</title>
    <description>Feed for thread: Switching 2 languages in a guide</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 12 Mar 2009 11:25:04 -0400</pubDate>
      <title>Switching 2 languages in a guide</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/246489#634296</link>
      <author>MRR </author>
      <description>Hi everybody,&lt;br&gt;
&lt;br&gt;
Is it possible to switch two languages in a guide? I know the easiest way would be to have two different guides, and execute one of them. But what i want to do is to have a menu in which you select the language, and then the guide changes  automatically all the strings displayed (all the uicontrols change its strings). Any suggestion?&lt;br&gt;
&lt;br&gt;
Kind regards,&lt;br&gt;
&lt;br&gt;
Mario</description>
    </item>
    <item>
      <pubDate>Thu, 12 Mar 2009 13:06:39 -0400</pubDate>
      <title>Re: Switching 2 languages in a guide</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/246489#634312</link>
      <author>Pj </author>
      <description>&quot;MRR&quot; &amp;lt;mario_ruz@hotmail.com&amp;gt; wrote in message &amp;lt;gpareg$dve$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi everybody,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is it possible to switch two languages in a guide? I know the easiest way would be to have two different guides, and execute one of them. But what i want to do is to have a menu in which you select the language, and then the guide changes  automatically all the strings displayed (all the uicontrols change its strings). Any suggestion?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Kind regards,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Mario&lt;br&gt;
&lt;br&gt;
Why not contain all the strings you use (labels, lists, text etc.) within two cell arrays where each cell correponds to one label in the GUI and all GUI commands for text reference to that cell array location. Then set your language UIcontrol callback to switch which cell array you pass to the gui and redraw it?&lt;br&gt;
&lt;br&gt;
Hope this work - it could get complicated but it is the most elegant solution I can think of off the top of my head - also easily extensible to multiple languages.</description>
    </item>
    <item>
      <pubDate>Mon, 04 May 2009 13:04:01 -0400</pubDate>
      <title>Re: Switching 2 languages in a guide</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/246489#647171</link>
      <author>Michael Katz</author>
      <description>Mario,&lt;br&gt;
&lt;br&gt;
&amp;nbsp;This is a great question. I've expanded upon the previous answer in my newest blog post: &lt;br&gt;
&lt;a href=&quot;http://blogs.mathworks.com/desktop/2009/05/04/internationalization-of-guis/&quot;&gt;http://blogs.mathworks.com/desktop/2009/05/04/internationalization-of-guis/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
I hope it gives you some good ideas.&lt;br&gt;
&lt;br&gt;
-Mike &lt;br&gt;
&lt;a href=&quot;http://blogs.mathworks.com/desktop&quot;&gt;http://blogs.mathworks.com/desktop&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&quot;MRR&quot; &amp;lt;mario_ruz@hotmail.com&amp;gt; wrote in message &amp;lt;gpareg$dve$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi everybody,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is it possible to switch two languages in a guide? I know the easiest way would be to have two different guides, and execute one of them. But what i want to do is to have a menu in which you select the language, and then the guide changes  automatically all the strings displayed (all the uicontrols change its strings). Any suggestion?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Kind regards,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Mario</description>
    </item>
    <item>
      <pubDate>Mon, 04 May 2009 22:23:02 -0400</pubDate>
      <title>Re: Switching 2 languages in a guide</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/246489#647340</link>
      <author>MRR </author>
      <description>Hi Michael,&lt;br&gt;
&lt;br&gt;
Thank you. I definitely solved the problem creating one guide per each language (I changed each string defined for each item). I created them with GUIDE, and I switch between languages by a menu (in each guide) which closes one and opens another gui when the user requests it. Of course it is not an elegant solution in comparison with those showed in your post. I will take a look to them for next guides I develope.&lt;br&gt;
&lt;br&gt;
Thanks for your answer.&lt;br&gt;
&lt;br&gt;
-Mario-&lt;br&gt;
&quot;Michael Katz&quot; &amp;lt;michael.katz@mathworks.com&amp;gt; wrote in message &amp;lt;gtmp41$s1q$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Mario,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  This is a great question. I've expanded upon the previous answer in my newest blog post: &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://blogs.mathworks.com/desktop/2009/05/04/internationalization-of-guis/&quot;&gt;http://blogs.mathworks.com/desktop/2009/05/04/internationalization-of-guis/&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I hope it gives you some good ideas.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -Mike &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://blogs.mathworks.com/desktop&quot;&gt;http://blogs.mathworks.com/desktop&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;MRR&quot; &amp;lt;mario_ruz@hotmail.com&amp;gt; wrote in message &amp;lt;gpareg$dve$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi everybody,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Is it possible to switch two languages in a guide? I know the easiest way would be to have two different guides, and execute one of them. But what i want to do is to have a menu in which you select the language, and then the guide changes  automatically all the strings displayed (all the uicontrols change its strings). Any suggestion?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Kind regards,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Mario</description>
    </item>
  </channel>
</rss>

