Hi list,<div><br></div><div>At the code sprint in Barcelona we had the idea to detect the language code automatically by the language the user selected at login (or the language set by default).</div><div>So Hal made a change in /bin/main.sh to read the $LANG parameter and set the default language (and welcome_message.txt) according to it. Here the additional source code:</div>
<div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">case `echo $LANG | sed 's/_.*//'` in</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> ja)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> LANG_CODE="ja"</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> ;;</font></div>
<div>
<font class="Apple-style-span" face="'courier new', monospace"> de)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> LANG_CODE="de"</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> ;;</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> it)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> LANG_CODE="it"</font></div><div>
<font class="Apple-style-span" face="'courier new', monospace"> ;;</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> es)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> LANG_CODE="es"</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> ;;</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> *)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> LANG_CODE="en"</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> ;;</font></div><div><font class="Apple-style-span" face="'courier new', monospace">esac</font></div><div><font class="Apple-style-span" face="'courier new', monospace">export LANG_CODE</font></div>
</div><div><br></div><div>The change for custom welcome message is in bin/install_desktop.sh (line 280):</div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">cp "$BUILD_DIR/../doc/$LANG_CODE"/welcome_message.* \</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> /usr/local/share/osgeo-desktop/</font></div></div><div><br></div><div>Currently this is only used for the welcome message, but the "LANG_CODE" could be used at any place we think.</div>
<div>The advantage of this would be, that even if users received a localized version of a LiveDVD, they would be able to read documents in another language (if available) or in English in case they switch to another language.</div>
<div><br></div><div>There are two issues though:</div><div><ul><li>It hasn't been tested yet when building a LiveDVD (probably we missed some other required changes somewhere).</li><li>Language codes have to be added or deleted when they are ready or not ready to be included.</li>
</ul><div>Daniel</div></div>