<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>App Localization &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/localization/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Tue, 11 Feb 2025 20:00:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>macOS: Add More Options to the Window Menu</title>
		<link>https://blog.xojo.com/2024/12/16/macos-add-more-options-to-the-window-menu/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Mon, 16 Dec 2024 16:00:00 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Declares]]></category>
		<category><![CDATA[macOS]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14163</guid>

					<description><![CDATA[By default, macOS adds several menu options to the Window menu of any Desktop app. Those options have been getting more interesting in the latest&#8230;]]></description>
										<content:encoded><![CDATA[
<p>By default, macOS adds several menu options to the Window menu of any Desktop app. Those options have been getting more interesting in the latest releases of the operating system, allowing, among other things, to set the position and arrangement of the Window on the screen, split the screen between the Window of one app and another app, or even sending a window of an app to an iPad as an &#8220;extended&#8221; screen in your macOS setup. Read on, adding these options to your Xojo-built macOS apps is just a few Declares away!</p>



<span id="more-14163"></span>



<p>Once you add this ability to your macOS apps, they will fit better when compared with other apps running alongside them. Even better, you don&#8217;t need to write additional code in order to handle these additional menu options.</p>



<p>Create a new Desktop project and add a new Module to it called &#8220;macOSExtra&#8221;. Then add a new method to it using the following signature, make sure to set the Scope of the property to Global:</p>



<pre class="wp-block-code"><code>AddMacOSWindowMenu(item as DesktopMenuItem)</code></pre>



<p>As you can see, this method expects to receive a DesktopMenuItem instance; but before we write a line of code for this method, select the MainMenuBar item in the project Navigator.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" width="84" height="62" src="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.50.03 p. m.png" alt="" class="wp-image-14164"/></figure>
</div>


<p>The previous action will bring up the Menu Editor. Click on the toolbar button in charge of adding a new first level menu item to the menu bar:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img fetchpriority="high" decoding="async" width="2058" height="696" src="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.49.08 p. m.png" alt="" class="wp-image-14165" srcset="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.49.08 p. m.png 2058w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.49.08 p. m-300x101.png 300w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.49.08 p. m-1024x346.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.49.08 p. m-768x260.png 768w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.49.08 p. m-1536x519.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.49.08 p. m-2048x693.png 2048w" sizes="(max-width: 2058px) 100vw, 2058px" /></figure>
</div>


<p>Next, with the new menu item selected in the Navigator, change the following properties in the associated Inspector Panel:</p>



<ul class="wp-block-list">
<li><strong>Name:</strong> WindowMenu</li>



<li><strong>Text:</strong> Window</li>
</ul>



<p>Now, let&#8217;s go back to the AddMacOSWindowMenu method in the &#8220;macOSEXtra&#8221; module, type the following code in the associated Code Editor:</p>



<pre class="wp-block-code"><code>// This code will be only executed when compiling the project
// for the macOS target

#if TargetMacOS then
  
  // We declare the function allowing us to get the reference to a class
  // from the macOS framework (Foundation, in this case), from the parameter passed
  // to it as a String (the class name we want to get the reference to).
  // You can get additional information about this from the Apple Documentation at: https://developer.apple.com/documentation/foundation/1395135-nsclassfromstring?language=objc
  Declare Function NSClassFromString Lib "Foundation" ( name As CFStringRef) As Ptr
  Var theClass As Ptr = NSClassFromString("NSApplication")
  
  // Now that we have the reference to the class
  // we will use it to call the shared method / selector from the NSApplication
  // class in charge or returning a reference to the running app (that is "our" app in this case).
  // You can get additional information about this from the Apple Documentation at:
https:&#47;&#47;developer.apple.com/documentation/appkit/nsapplication/shared?language=objc
  
  Declare Function GetSharedApplication Lib "AppKit" Selector "sharedApplication" (Application As ptr) As Ptr
  Var theApp As Ptr = GetSharedApplication(theClass)
  
  // Now that we have a reference to the app object, we need to get a reference to the "submenu" hanging from the menu instance received as parameter by the method. For that
  // we need to call the method / selector "submenu" passing along the underlying native
  // menu object retrieved via the "Handle" property from DesktopMenuItem.
  
  Declare Function GetSubmenu Lib "AppKit" Selector "submenu" (menuReference As Ptr) As Ptr
  Var subMenu As Ptr = GetSubmenu(item.Handle)
  
  // The last step is to assign the previous reference to the window property from the app reference.
  // You can get additional information about this from the Apple Documentation at: https://developer.apple.com/documentation/appkit/nsapplication/windowsmenu?language=objc
  
  Declare Sub setWindowMenu Lib "AppKit" selector "setWindowsMenu:" ( appReference As Ptr, menuReference As Ptr)
  setWindowMenu(theApp, subMenu)
  
#EndIf
</code></pre>



<h2 class="wp-block-heading">Testing it!</h2>



<p>In order to see how this new method works, select the App item under the IDE Navigator and add the Opening event. Then, type the following line of code in the associated Code Editor:</p>



<pre class="wp-block-preformatted">AddMacOSWindowMenu(WindowMenu)</pre>



<p>Run the app and click on the Window item in the main menu bar. You should see that the operating system has added several menu options, similar to the ones displayed in this screenshot (they will vary depending the macOS version the app is running on):</p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" width="1686" height="1054" src="https://blog.xojo.com/wp-content/uploads/2024/12/WindowMenu.png" alt="" class="wp-image-14166" srcset="https://blog.xojo.com/wp-content/uploads/2024/12/WindowMenu.png 1686w, https://blog.xojo.com/wp-content/uploads/2024/12/WindowMenu-300x188.png 300w, https://blog.xojo.com/wp-content/uploads/2024/12/WindowMenu-1024x640.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/12/WindowMenu-768x480.png 768w, https://blog.xojo.com/wp-content/uploads/2024/12/WindowMenu-1536x960.png 1536w" sizes="(max-width: 1686px) 100vw, 1686px" /></figure>
</div>


<p>Choose any of the options added and you will see how macOS handles them, without the need to write a line of code in you Xojo project to do it.</p>



<h2 class="wp-block-heading">Localizing the Window Menu</h2>



<p>At this point, the Window menu with the added menu options will look great, but if your app is localized to other languages, then it will be a bit odd to read &#8220;Window&#8221; for the menu (as well as the English text in the added menu items). To improve this experience, let&#8217;s localize the WindowMenu item too!</p>



<p>Let&#8217;s add a new Constant to the &#8220;macOSExtra&#8221; Module and name it &#8220;kWindowName&#8221; setting its default value to &#8220;Window&#8221; and switching on the &#8220;Localized&#8221; field in the Inspector Panel:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="606" height="502" src="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.33.42 p. m.png" alt="" class="wp-image-14167" srcset="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.33.42 p. m.png 606w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.33.42 p. m-300x249.png 300w" sizes="auto, (max-width: 606px) 100vw, 606px" /></figure>
</div>


<p>Then, use the associated Constant Editor to add new entries (in as many as languages you support). In this case we will just add the entries to support both English and Spanish:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="920" height="378" src="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.34.17 p. m.png" alt="" class="wp-image-14168" srcset="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.34.17 p. m.png 920w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.34.17 p. m-300x123.png 300w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.34.17 p. m-768x316.png 768w" sizes="auto, (max-width: 920px) 100vw, 920px" /></figure>
</div>


<p>Next, select the WindowMenu item hanging from the MainMenuBar item in the Navigator, and change the value of the Text property to use the new constant:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="2058" height="738" src="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.44 p. m.png" alt="" class="wp-image-14169" srcset="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.44 p. m.png 2058w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.44 p. m-300x108.png 300w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.44 p. m-1024x367.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.44 p. m-768x275.png 768w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.44 p. m-1536x551.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.44 p. m-2048x734.png 2048w" sizes="auto, (max-width: 2058px) 100vw, 2058px" /></figure>
</div>


<p>Change the macOS Settings &gt; General &gt; Idiom and Region so the Spanish language is the main language. Then run the Xojo project again from the IDE and you will see how the &#8220;Window&#8221; menu entry now reads &#8220;Ventana&#8221;. Moreover, macOS will add the right localizations for the added menu items so they are in Spanish too.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1654" height="1508" src="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.31.27 p. m.png" alt="" class="wp-image-14170" srcset="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.31.27 p. m.png 1654w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.31.27 p. m-300x274.png 300w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.31.27 p. m-1024x934.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.31.27 p. m-768x700.png 768w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.31.27 p. m-1536x1400.png 1536w" sizes="auto, (max-width: 1654px) 100vw, 1654px" /></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1764" height="1104" src="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.04 p. m.png" alt="" class="wp-image-14171" srcset="https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.04 p. m.png 1764w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.04 p. m-300x188.png 300w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.04 p. m-1024x641.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.04 p. m-768x481.png 768w, https://blog.xojo.com/wp-content/uploads/2024/12/Captura-de-pantalla-2024-12-09-a-las-1.37.04 p. m-1536x961.png 1536w" sizes="auto, (max-width: 1764px) 100vw, 1764px" /></figure>
</div>


<h2 class="wp-block-heading">In Brief</h2>



<p>As you have seen, using just a few Declares we have been able to add the expected options for the Window menu to our macOS apps, without the need to write the code in charge of handling them! This doesn&#8217;t just mean more options for your users, it also means your Xojo apps will look and feel better when running on macOS.</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android Localization</title>
		<link>https://blog.xojo.com/2024/12/10/android-localization/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 10 Dec 2024 16:37:49 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[2024r4]]></category>
		<category><![CDATA[App Localization]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13927</guid>

					<description><![CDATA[You can now take advantage of Localized Strings in your Android projects to better localize your text. Localized Strings are added to using the Constant&#8230;]]></description>
										<content:encoded><![CDATA[
<p>You can now take advantage of Localized Strings in your Android projects to better localize your text. Localized Strings are added to using the Constant Editor using these steps:</p>



<ol class="wp-block-list">
<li>Add a Constant, give it a name, default value and set its type to String.</li>



<li>A Localized property will now appear in the Inspector. Turn it on.</li>



<li>This constant will now appear in a new &#8220;Localized Strings&#8221; section in the Navigator for the project item.</li>



<li>Use the &#8220;+&#8221; button to add a localized string, then set its Language and Value.</li>



<li>Use this localized string in your project.</li>
</ol>



<p>Below is a localized string that contains some translations of &#8220;thanks&#8221;.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="213" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-1-1024x213.png" alt="" class="wp-image-13928" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-1-1024x213.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/10/image-1-300x62.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-1-768x160.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/image-1-1536x319.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/10/image-1-2048x426.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The most common way to use this is to specify the localized string name as the text property for a control, such as a Label. You prefix the name with &#8220;#&#8221; to indicate it should be looked up at runtime.</p>



<p>Below you can see &#8220;#ThanksString&#8221; is set as the value for the Text property of Label1.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="776" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-2-1024x776.png" alt="" class="wp-image-13929" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-2-1024x776.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/10/image-2-300x227.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-2-768x582.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/image-2-1536x1164.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/10/image-2.png 1866w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Note that &#8220;Default&#8221; is shown in the IDE because it is using the value for the &#8220;Default&#8221; language in the localized string. If there was no &#8220;Default&#8221; language, then the value specified in the Inspector as the &#8220;Default Value&#8221; is shown in the IDE.</p>



<p>If we then run this project on a device set to US locale, it displays &#8220;Thanks&#8221;:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="554" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-3.png" alt="" class="wp-image-13931" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-3.png 800w, https://blog.xojo.com/wp-content/uploads/2024/10/image-3-300x208.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-3-768x532.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure>



<p>If I change to a German locale and run again, it shows &#8220;Danke&#8221;:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="774" height="466" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-6.png" alt="" class="wp-image-13934" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-6.png 774w, https://blog.xojo.com/wp-content/uploads/2024/10/image-6-300x181.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-6-768x462.png 768w" sizes="auto, (max-width: 774px) 100vw, 774px" /></figure>



<p>To change the locale, open <em>Settings</em> on the Android device. Navigate to <em>System</em> and then <em>Languages &amp; input</em>. There you will see the <em>Languages</em> option.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="780" height="514" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-4.png" alt="" class="wp-image-13932" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-4.png 780w, https://blog.xojo.com/wp-content/uploads/2024/10/image-4-300x198.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-4-768x506.png 768w" sizes="auto, (max-width: 780px) 100vw, 780px" /></figure>



<p>Choose that to see the list of languages supported by the device. Click the &#8220;+&#8221; to add a language. Here I&#8217;ve added German (Deutsch):</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="758" height="758" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-5.png" alt="" class="wp-image-13933" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-5.png 758w, https://blog.xojo.com/wp-content/uploads/2024/10/image-5-300x300.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-5-150x150.png 150w" sizes="auto, (max-width: 758px) 100vw, 758px" /></figure>



<p>To make Deutsch the default, drag it so that it is first in the list. You&#8217;ll immediately see the UI change its language.</p>



<p>You can also specifically request a language in code by providing the locale as a parameter to the localized string. For example to get the French value:</p>



<pre class="wp-block-code"><code>Var french As String
french = ThanksString("FR")
// Variable french now contains "Merci".</code></pre>



<p>Read the <a href="https://documentation.xojo.com/topics/localizing_your_apps/introduction_to_app_localization.html">Introduction to App Localization</a> documentation topic to learn more.</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Xojo 2024r4 is Now Available!</title>
		<link>https://blog.xojo.com/2024/12/10/xojo-2024r4-is-now-available/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Tue, 10 Dec 2024 16:36:12 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r4]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[Code Editor]]></category>
		<category><![CDATA[Hardened Runtime]]></category>
		<category><![CDATA[Notarization]]></category>
		<category><![CDATA[Preemptive Threads]]></category>
		<category><![CDATA[Sandboxing]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14183</guid>

					<description><![CDATA[Xojo 2024 Release 4 introduces a suite of powerful new features and enhancements, along with numerous bug fixes, further solidifying Xojo’s commitment to providing a&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2024 Release 4 introduces a suite of powerful new features and enhancements, along with numerous bug fixes, further solidifying Xojo’s commitment to providing a robust and versatile development environment. With 33 new features added and 182 bugs fixed, Xojo 2024r4 is designed to enhance your productivity and expand your creative possibilities.</p>



<h2 class="wp-block-heading">What’s New in Xojo 2024r4</h2>



<p>Xojo 2024r4 brings a range of exciting updates that enhance cross-platform development, improve security, and provide more tools for creating dynamic and interactive applications. Here are some of the standout features:</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Android Localization</strong></p>



<p>Expand your app’s reach with comprehensive localization support for Android. Easily add translations and switch locales using the intuitive Constant Editor, allowing you to cater to a diverse, global audience without the hassle.</p>



<p><a href="https://blog.xojo.com/2024/12/10/android-localization/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/android-localization/" target="_blank" rel="noreferrer noopener">Learn more about Android Localization</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Extended Android Features</strong></p>



<p>We&#8217;ve enhanced Android support by integrating several standard Xojo language features, including Structures, ByRef parameters, Operator_Lookup, and Operator_Convert.</p>



<p><a href="https://blog.xojo.com/2024/12/10/android-language-features/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/android-language-features/" target="_blank" rel="noreferrer noopener">Discover the Extended Android Features</a></p>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Selection Matching</strong></p>



<p>Boost your coding efficiency with the new Selection Matching feature in Xojo&#8217;s Code Editor. Quickly highlight and track all occurrences of selected text in your code, making it easier to navigate, refactor, and maintain your projects.</p>



<p><a href="https://blog.xojo.com/2024/12/10/code-editor-selection-matching/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/code-editor-selection-matching/" target="_blank" rel="noreferrer noopener">Learn more about Code Selection Matching</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Secure Mac Apps</strong></p>



<p>Enhance the security of your Mac applications directly from the Xojo IDE with built-in support for Sandboxing, Hardened Runtime, and Notarization. These features ensure your apps meet the latest security standards, providing a safe and trusted experience for your users.</p>



<p><a href="https://blog.xojo.com/2024/12/10/sandboxing-hardened-runtime-and-notarization-arrives-to-the-xojo-ide/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/sandboxing-hardened-runtime-and-notarization-arrives-to-the-xojo-ide/" target="_blank" rel="noreferrer noopener">Learn more</a></p>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Enhanced Charts</strong></p>



<p>Take control of your data visualization with Enhanced Charts. Gain precise control over DataSets and legends, and design dynamic, interactive charts using new event handlers and properties. These improvements make it easier to create visually compelling and informative charts for your applications.</p>



<p><a href="https://blog.xojo.com/2024/12/10/more-control-over-your-charts/" target="_blank" rel="noreferrer noopener">Read about the enhanced Charts</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Preemptive Threads</strong></p>



<p>Experience faster execution, better debugging, and smarter object handling with the enhanced Preemptive Threads. This feature maximizes your application’s performance on multi-core systems, allowing for more responsive and efficient code.</p>



<p><a href="https://blog.xojo.com/2024/12/10/sharpening-our-preemptive-threads/" target="_blank" rel="noreferrer noopener">Understand Preemptive Threads</a></p>
</div>
</div>



<p><strong>Web Framework</strong><br>Enjoy smoother and more efficient web applications with updates to Xojo&#8217;s Web Framework. Improved memory usage and numerous bug fixes ensure that your web apps run reliably and perform optimally, providing a better experience for your users.</p>



<p><a href="https://blog.xojo.com/2024/12/10/xojo-web-improvements-in-2024r4/" target="_blank" rel="noreferrer noopener">Discover Web Framework Improvements</a></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>These updates and enhancements are designed to make your development process more efficient, productive, and enjoyable. Whether you’re building new applications or enhancing existing ones, Xojo 2024r4 provides the tools and capabilities you need to succeed.</p>



<h2 class="wp-block-heading">Get Started</h2>



<p>To learn more about Xojo 2024 Release 4 and begin your development journey, please visit the&nbsp;<a href="https://documentation.xojo.com/versions/2024r4/resources/release_notes/2024r4.html" target="_blank" rel="noreferrer noopener">Xojo 2024r4 Release Notes</a>. The update is available for download now from the&nbsp;<a href="https://xojo.com/download/" target="_blank" rel="noreferrer noopener">Xojo downloads page</a>.</p>



<h3 class="wp-block-heading">What’s Next?</h3>



<p>We’re continuously working on new features, updates, and enhancements to our platform. If you have any suggestions or ideas, please add them to the&nbsp;<a href="https://tracker.xojo.com/xojoinc/xojo">Xojo tracker</a>. We’re always looking to improve and expand Xojo to better serve our community.</p>



<p><strong>Thank you for being part of the Xojo community. We’re excited to see what you create with Xojo 2024r4!</strong></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Localizing XAML Controls in Windows Projects</title>
		<link>https://blog.xojo.com/2023/08/16/localizing-xaml-controls/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Wed, 16 Aug 2023 13:00:00 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[XAML]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11937</guid>

					<description><![CDATA[If you build desktop apps for Windows and wish to start using the new XAML-based controls via the DesktopXAMLContainer but aren't sure how to localize those controls, here's the solution:]]></description>
										<content:encoded><![CDATA[
<p>If you build desktop apps for Windows and wish to start using the new XAML-based controls via the DesktopXAMLContainer but aren&#8217;t sure how to localize those controls, here&#8217;s the solution:</p>



<ol class="wp-block-list">
<li>Drag a <a href="https://documentation.xojo.com/api/user_interface/desktop/desktopxamlcontainer.html#desktopxamlcontainer">DesktopXAMLContainer</a> to a window.</li>



<li>Add the Opening event handler.</li>



<li>In the Opening event handler, create the XAML string that defines the control you want and concatenate in your localized constant.</li>
</ol>



<p>Here&#8217;s an example of a simple button with a localized constant named Hello used to define the button text:</p>



<pre id="Xojo" class="wp-block-code"><code><code>Me.Content = "&lt;Button Name='Button' Content='" + Hello + "' /&gt;"</code></code></pre>



<p>Notice that you can use single quotes for the the values.  Which makes concatenating them via code easier.</p>



<p>If you&#8217;re not exactly sure what the right XAML code is, drag out a <a href="https://documentation.xojo.com/api/user_interface/desktop/desktopxamlcontainer.html#desktopxamlcontainer">DesktopXAMLContainer</a>, click on the Pencil icon on it and then choose the control you want and click the OK button. In the Inspector, you can now edit the Content property of your control to see what the XAML code is to create that control. You can then set the Content property in the Opening event (as described above) using that string.</p>



<p><em>Geoff Perlman is the Founder and CEO of Xojo. When he&#8217;s not leading the Xojo team he can be found playing drums in Austin, Texas and spending time with his family. </em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The Versatility of Xojo</title>
		<link>https://blog.xojo.com/2022/12/06/the-versatility-of-xojo/</link>
		
		<dc:creator><![CDATA[Jérémie Leroy]]></dc:creator>
		<pubDate>Tue, 06 Dec 2022 16:49:04 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Xojo Cloud]]></category>
		<category><![CDATA[App Hosting]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[GraffitiSuite]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Trello]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo API 2.0]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11006</guid>

					<description><![CDATA[Many people around the world are celebrating the holidays by giving gifts, which means more and more people are organizing Secret Santa events. In November of 2018, Jérémie Leroy had the idea of making a Secret Santa iOS app. 3 years, 32 languages and 6.5 millions downloads later, Jérémie incorporated Xojo Web to improve his highly successful Xojo iOS app. Secret Santa is a prime example of what is possible and how you can leverage your Xojo skills to expand to other platforms when you need to.]]></description>
										<content:encoded><![CDATA[
<p>It is soon time for the end of year festivities. Many people around the world are celebrating the holidays by giving gifts, which means more and more people are organizing Secret Santa events. During these events, members of a group of friends, family, or colleagues will draw names to become someone’s Secret Santa and then give them a holiday gift, usually something fun.</p>



<figure class="wp-block-table aligncenter"><table><tbody><tr><td class="has-text-align-left" data-align="left"><strong>Did you know?</strong></td></tr><tr><td class="has-text-align-left" data-align="left">Secret Santa is known by different names around the world, such as “Amigo Invisible” in Spanish, “Amigo Secreto” in Portuguese, “Тайный Санта” in Russian.</td></tr></tbody></table></figure>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>I first made a desktop Secret Santa app back in 2015 for an event with friends. We were tired of drawing names out of a hat and having couples being paired together. The app I created solved that problem because couples were excluded from offering a gift to each other. And we didn’t need a hat!</p>



<p>In November of 2018, I had the idea of making a <a href="https://apps.apple.com/app/apple-store/id1442673273?pt=118403140&amp;ct=XojoBlog&amp;mt=8">Secret Santa iOS app</a> so that anyone with an iPhone or iPad could benefit from the same features I had been enjoying for the past 3 years.</p>



<p>The app would need to be easy to use, avoid couples getting matched with each other, send notifications by email without letting the organizer know which pairs were matched, and of course make sure no name would be assigned twice.</p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://apps.apple.com/app/apple-store/id1442673273?pt=118403140&amp;ct=XojoBlog&amp;mt=8"><img loading="lazy" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2022/12/Screen-Shot-2022-12-06-at-9.12.28-AM.png" alt="" class="wp-image-11009" width="168" height="352" srcset="https://blog.xojo.com/wp-content/uploads/2022/12/Screen-Shot-2022-12-06-at-9.12.28-AM.png 304w, https://blog.xojo.com/wp-content/uploads/2022/12/Screen-Shot-2022-12-06-at-9.12.28-AM-143x300.png 143w" sizes="auto, (max-width: 168px) 100vw, 168px" /></a></figure>
</div></div>
</div>



<p>After just 8 days of development, the app was ready to ship and sent to the App Store.</p>



<p>Within 5 days, the app had been downloaded from 35 different countries and was my fastest app to reach 1000 downloads!</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img decoding="async" src="https://lh6.googleusercontent.com/U-yY3aE161mfhU3H6k9ODFP4LtuwzFNWzRrvUdRIvs3cLeHG2sydLIDWL1Ic65Lnw9rJvRQ8mGn82ComNHKq2s-pDWIJoGimmA5082pg_IDuI1KCwX9U82FGIkTSFev4LRYR20Tc8Tkgfn9UlL18C2cAraTTFzJKR4Np5fDCtqwc8jDcjeP1D4e2-mPSBg" alt="" width="-43" height="-22"/></figure>
</div>


<p><a href="https://apps.apple.com/app/apple-store/id1442673273?pt=118403140&amp;ct=XojoBlog&amp;mt=8"></a></p>



<p>Having the app translated to English, French, Italian, and Spanish in the initial release helped to reach more users.</p>



<p>Version 1.1 of the app was released a few days later with German and Portuguese translations.</p>



<p>That’s when I realized that Secret Santa is something extremely common in Latin America. Many families draw names for Christmas so that they can give and receive one big gift instead of smaller trivial gifts for each family member.</p>



<p>Most updates of the app came with new localizations, which really helped in realizing more and more downloads. After 3 years of updates, the app is now available in 32 languages.</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" src="https://lh5.googleusercontent.com/DJt7zuBJxMbga7qB9LWyTwy-ZwnBYIBS4XbqTmOsuBh25vtv3UN1THXY32Z55sxG0arqCOpyKo1ttUT1q7iY5Z0Y1I9XhT8lbv6C_FPMsLPuhAiZ3q0AIdH9RUhBEGiXP4ft3aGzqAyiND3qk7bH4OSXuXNo3jRc4BPFhDmtT5kHLF2w3cgO66QPT6BctQ" alt="" width="895" height="635"/></figure>
</div>


<p>A high quantity of downloads also meant that I received a lot of feedback from users. Many users were happy with the current features, but I started getting feature requests to send the gift pairs by SMS or WhatsApp instead of by email. We all have a parent or grand-parent who isn’t tech-savvy and doesn’t have an email address.</p>



<h2 class="wp-block-heading"><strong>Leveraging the biggest advantage of Xojo &#8211; Sharing code across platforms</strong></h2>



<p>From 2018 until 2022, I had become used to updating the Secret Santa app itself to add new features and new translations while also fixing bugs. This year, I received a message from an unhappy user stating that they really need a wishlist feature and downloaded my app thinking it already had one.</p>



<p>A valid wishlist feature needed to be accessible to anyone with an Internet connection, whether they used a computer, an iPhone, or an Android device.</p>



<p>Using Xojo Web and a coding language I already knew was the obvious choice for this task. Sharing important bits of code from my main iOS project to the web wishlist project was as easy as copy and paste.</p>



<p>As with any Xojo project, copying classes from one project to the other was a real time saver, especially for the API layer required to communicate between Xojo and the online database that holds all the Secret Santa data.</p>



<p>The main difficulty working on a web project came from the UI. Not that Xojo Web’s UI is difficult, but I am so used to designing mobile apps that my brain didn&#8217;t know where to start.</p>



<p>I knew I wanted to display two columns of data:</p>



<ul class="wp-block-list"><li>The user’s wishlist</li><li>The wishlist from the person they are offering a gift to</li></ul>



<p>The layout had to be responsive to be accessible on both mobile and desktop devices.</p>



<p><a href="https://graffitisuite.com">Graffitisuite</a> from Anthony Cyphers came to mind, and within a few minutes of reviewing the online demo, I was convinced to use GraffitiKanban web control. I am a big fan of <a href="https://trello.com">Trello</a> for organizing my work, displaying cards in labeled columns. That&#8217;s exactly what I needed for the wishlist feature.</p>



<p>GraffitiKanban is “responsive” (Web Design term), meaning the display changes to adapt to smaller screens such as mobile devices.</p>



<p>GraffitiSuite also offers a wide variety of UI elements that made me save a lot of time.</p>



<p>7 days after the initial feature request, the wishlist feature was available to all.</p>



<p><strong>Wishlist on a desktop browser:</strong></p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://lh3.googleusercontent.com/idkQ031bZaWEyP1Pj4BULLGJRc-Xz95sl4xlCkYD2KZt1IsMKOvsoP9ywwY5f81wwykuMuWqofDIelJNIiwE0j0IcF93ZXyaXFBmVK991oigNXPmi7W6BR1_b44sWWWKkYO7jAXVbjDC6Io4RVwhVveV8oM4Nu1UOPMXzrcxPL-VtdgVNB3bQ58MtolkmQ" alt=""/></figure>
</div>


<p><strong>Wishlist on a mobile browser:</strong></p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://lh6.googleusercontent.com/9KZB2JwTAt2cLXTb7Es_G2Qdwldmfa1nMRmS7F2s9Pb2iVuz0e4M5Zj_8XfUn97QTUvU-78i8cDq5JZOrMwr-ROe0ihov1R2YDZSVseEky4KwTATMxU2tQHD6TXQpouL37NXEryK86JjTv36A-N-VHSqCXKXYza6M2V8WyWmP7Wie5kY_0GuMaOeixI0" alt=""/></figure>
</div>


<p>Deploying the app to <a href="https://www.xojo.com/cloud">Xojo Cloud</a> was extremely easy.</p>



<p>A single button press in Xojo, a subdomain DNS record, 2 minutes of configuration in Cloudflare, and the web app was up, running, and accessible through HTTPS.</p>



<figure class="wp-block-image"><img decoding="async" src="https://lh6.googleusercontent.com/o76SHsHWThArJFy__WCn9HW8rgFJ2Q0lJqq12o3ReAXRszlJe5VESNgYThKLfHtsU2hfOHrm5IbBVOOjCf4n6hjdUaYMZM0vjhfHGOsVmQkugEHbHHInjG29mDEpOk4-Ef8sg98ZTZp1esNIU4JM1jQ4qTZSdxLcrY_YKlOUKCW2_lWqV84NTyp-vvnnJQ" alt=""/></figure>



<p>Customer use of the wishlist feature has blown-up more than I ever would have expected. So far 30,000 gift ideas have been added to the wishlist (and counting).</p>



<h2 class="wp-block-heading"><strong>The next feature request</strong></h2>



<p>With an app that sees 60,000 new users per month, I receive a lot of feature requests. Most recently, I received a one star review on the app store because my app isn&#8217;t accessible to the Visually Impared. When VoiceOver is activated, all it says is “button”, “button”, “button”, with no explanation.</p>



<p>Adding voice-over capabilities in Xojo is simple. The <a href="https://documentation.xojo.com/api/user_interface/mobile/mobileuicontrol.html#mobileuicontrol">MobileUIControl</a> class has two String properties, AccessibilityHint and AccessibilityLabel.</p>



<p>But it actually is a lengthy task to check each control on each screen and make sure that the translations are correct.</p>



<p>VoiceOver support will soon be released in English and French, but all other localizations will be only ready next year. It is currently a bad time to get 30 different translators to work on the project under such short notice.</p>



<p>Xojo has enabled me to create a business out of developing iOS apps for the App Store. Including all of my apps, I have had over 6.5 million downloads and counting. Secret Santa is a prime example of what is possible and how you can leverage your Xojo skills to expand to other platforms when you need to. I look forward to what’s to come and will be at <a href="https://www.xojo.com/xdc">XDC London</a> to learn more about the future.</p>



<p>If you are organizing a Secret Santa event or just curious to see the app, download Secret Santa on the <a href="https://apps.apple.com/app/apple-store/id1442673273?pt=118403140&amp;ct=XojoBlog&amp;mt=8">App Store.</a></p>



<p><em>Jérémie Leroy has been using Xojo since 2008, he won two Xojo Design Awards in the iOS App category and has released over 13 iOS apps made with Xojo on the App Store. He also released </em><a href="https://github.com/jkleroy/iOSDesignExtensions"><em>iOSDesignExtensions</em></a><em> on Github to help style and polish your Xojo made iOS apps.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Guest Post: Adding Language Translation to Your Xojo Apps</title>
		<link>https://blog.xojo.com/2019/05/13/guest-post-adding-language-translation-to-your-xojo-apps/</link>
		
		<dc:creator><![CDATA[Tim Dietrich]]></dc:creator>
		<pubDate>Mon, 13 May 2019 10:00:17 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[CURL]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Middleware]]></category>
		<category><![CDATA[Monkeybread Software]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Translation]]></category>
		<category><![CDATA[Web Service]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=5735</guid>

					<description><![CDATA[I've been amazed at the speed and accuracy of the Amazon Translate service. And after developing the AWSTranslator class, I was able to quickly and easily add language translation to my client's middleware app.]]></description>
										<content:encoded><![CDATA[<p>Recently, I was asked by a client if it would be possible to build language translation functionality into a Xojo-based middleware solution that I had developed for them. The Xojo app obtains product information (including product names, descriptions, and other marketing-related information) from suppliers via a SOAP call, and returns the data in a JSON-encoded response. They wanted to be able to translate the product information, which is provided in English, to other languages (such as French, German, etc). The client wanted something similar to <a href="https://translate.google.com/">Google Translate</a>. However, they wanted the translation function to be built directly into the app and to be performed &#8220;on demand.&#8221;</p>
<p>I did some research and found that Amazon provides a service that does exactly what the client was asking for. The service, called <a href="https://aws.amazon.com/translate/">Amazon Translate</a>, is available as one of many services that are available through Amazon Web Services.</p>
<p>In this post, I&#8217;ll walk you through the process of getting signed up for Amazon Translate, and then share some code that you can use to add language translation to your own Xojo projects. We&#8217;ll use the MBS Xojo CURL Plugin, which makes calling the Amazon Translate API easy. But first, let&#8217;s learn a little about Amazon Translate.</p>
<p><span id="more-5735"></span></p>
<h3><b>Amazon Translate</b></h3>
<p>Amazon Translate is an API that can be used to translate text on demand. You send it text in a &#8220;source language,&#8221; tell the API what that source language is, as well as the &#8220;target language&#8221; that you want the text translated to. The API responds with the translated text.</p>
<p>Amazon Translate uses machine learning and neural networks that have been designed specifically for language translation. When performing a translation, the service reads the text one sentence at a time, and reads each word individually, to determine the meaning of a sentence. In other words, the service doesn&#8217;t just translate words. Instead, it&#8217;s acting as an interpreter. This results in translations that are extremely accurate.</p>
<p>In order to use Amazon Translate, you&#8217;ll need an <a href="http://aws.amazon.com/">AWS account</a>. If you already have an AWS account, log into the account.</p>
<p>Next, you&#8217;ll need to create an &#8220;Identity and Access Management&#8221; (IAM) user. To do so, under Services, select &#8220;IAM&#8221; (which can be found in the &#8220;Security, Identity, &amp; Compliance&#8221; category). This will present you with the IAM Dashboard.</p>
<p>Under Groups, create a new group and give it a recognizable name. For example, you might call the group &#8220;translate.&#8221; As you are creating the group, give it the &#8220;TranslateFullAccess&#8221; permission.</p>
<p>Next, create an IAM user. Under Users, click the &#8220;Add user&#8221; button. Give the user a name such as &#8220;XojoTranslater.&#8221; For the &#8220;AWS access type&#8221; be sure to select &#8220;Programmatic access.&#8221; Add the user to the &#8220;translate&#8221; group that you created above. There&#8217;s no need to assign any tags to the user, so you can skip that step.</p>
<p>And finally, create an Access key for the user. Be sure to make note of both the &#8220;Access key ID&#8221; and &#8220;Secret access key&#8221; values that are automatically assigned. You&#8217;ll need these in order to make API calls.</p>
<h3><b>The MBS Xojo CURL Plugin</b></h3>
<p>If you don&#8217;t already have the <a href="https://www.monkeybreadsoftware.de/xojo/plugin-curl.shtml">MBS Xojo CURL Plugin</a>, download it and install it. To install the plugin, simply drag it into the Xojo &#8220;Plugins&#8221; folder.</p>
<p>The project will work with an unlicensed version of the MBS Xojo CURL Plugin. In this case, you&#8217;ll occasionally see a popup message reminding you to purchase a license. However, I highly encourage you to purchase a license. You can license the plugin individually, or as part of the MBS Complete plugin bundle.</p>
<h3><b>The Xojo Example Project</b></h3>
<p>To demonstrate the Amazon Translate service, I&#8217;ve put together an example Xojo desktop project (<a href="https://s3.amazonaws.com/tdietrich-opensource/aws-translate-demo.xojo_binary_project.zip">project file</a>). Before running the application, be sure to set the three App-level properties: AWSAccessKeyId, AWSSecretAccessKey, and the AWSRegion. For the AWSAccessKeyId and AWSSecretAccessKey properties, use the values that you set when you created the Access key for the user. For the AWSRegion, refer to <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">this</a> and use the value that makes the most sense for you.</p>
<p>Once you&#8217;ve configured the app, run it, and it will look something like this.</p>
<p> </p>
<h3><b>The Xojo Code</b></h3>
<p>Let&#8217;s take a look at some of the code.</p>
<p>The AWSTranslator class is a subclass of the CURLSMBS class. The class does two important things: It provides access to a list of the languages that are supported, and provides a method for calling the Amazon Translate API.</p>
<p>The &#8220;Languages&#8221; property is a dictionary that you can use to get the names of the languages that Amazon Translate supports and the corresponding language codes. The example app uses this dictionary to populate the &#8220;Translate From&#8221; (SourcePopupMenu) and &#8220;Translate To&#8221; (TargetPopupMenu) popup menus.</p>
<p>The Translate method creates the payload that gets sent to the Amazon Translate API, and sets special HTTP headers that are needed in order to call the API. But most importantly, it uses the CURLSMBS class&#8217;s &#8220;SetupAWS&#8221; method to configure the CURL instance so that all of the steps that are required to &#8220;sign&#8221; the API request are done automatically. This is an amazingly convenient function of the MBS Xojo CURL Plugin. You can get a sense of what&#8217;s involved in signing the request <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">here</a>.</p>
<p>To translate text using the AWSTranslator class, you create an instance, configure it with your IAM credentials and AWS region, pass it the source language text, the source language code, and the target language code. In the example app, this all handled in the Window1.Translate method. The values are pulled from the App-level properties, as well as the various window controls. Finally, you call the AWSTranslator instance&#8217;s Translate method. If the translation is successful, the translated text will be available via the TranslatedText property. If any errors occur, the ErrorType and ErrorMessage properties will be set.</p>
<p>The &#8220;Estimated Translation Cost&#8221; is calculated whenever the Source Text changes. The value is calculated by taking the length (number of characters) of the Source Text and multiplying it by 0.000015 (the average cost for translating a single character).</p>
<h3><b>Wrapping Up</b></h3>
<p>I&#8217;ve been amazed at the speed and accuracy of the Amazon Translate service. And after developing the AWSTranslator class, I was able to quickly and easily add language translation to my client&#8217;s middleware app.</p>
<p>I hope you&#8217;re equally impressed by the Amazon Translate service, and that you find the AWSTranslator class to be helpful in your own Xojo projects.</p>
<p><i>Tim Dietrich is a custom software developer based in Richmond, Virginia. To learn more, visit: <a href="https://timdietrich.me/" target="_blank" rel="noopener noreferrer" data-saferedirecturl="https://www.google.com/url?q=https://timdietrich.me&amp;source=gmail&amp;ust=1552488320387000&amp;usg=AFQjCNEDiwUxo_XLnpKX-Bt3nL8FIQTxZA">https://timdietrich.me</a></i></p>


<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1024" height="711" src="https://blog.xojo.com/wp-content/uploads/2019/05/Screen-Shot-2019-04-01-at-4.21.01-PM-1024x711.png" alt="" class="wp-image-5753" srcset="https://blog.xojo.com/wp-content/uploads/2019/05/Screen-Shot-2019-04-01-at-4.21.01-PM-1024x711.png 1024w, https://blog.xojo.com/wp-content/uploads/2019/05/Screen-Shot-2019-04-01-at-4.21.01-PM-300x208.png 300w, https://blog.xojo.com/wp-content/uploads/2019/05/Screen-Shot-2019-04-01-at-4.21.01-PM-768x533.png 768w, https://blog.xojo.com/wp-content/uploads/2019/05/Screen-Shot-2019-04-01-at-4.21.01-PM.png 1532w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Localize Your Edit Menu on Mac</title>
		<link>https://blog.xojo.com/2018/09/19/localize-your-edit-menu-on-mac/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Wed, 19 Sep 2018 10:00:21 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[Translation]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=4956</guid>

					<description><![CDATA[On macOS you may have noticed two special menu items that appear at the bottom of the Edit menu: "Start Dictation" and "Emoji &#038; Symbols". These menu items are added automatically by macOS provided your Xojo app follows a few simple rules.]]></description>
										<content:encoded><![CDATA[<p>On macOS you may have noticed two special menu items that appear at the bottom of the Edit menu: &#8220;Start Dictation&#8221; and &#8220;Emoji &amp; Symbols&#8221;. These menu items are added automatically by macOS provided your Xojo app follows a few simple rules.</p>
<p><span id="more-4956"></span></p>
<p>For English systems you don&#8217;t have to do anything. By default the Edit menu text is &#8220;Edit&#8221; so macOS will find it and automatically add &#8220;Start Dictation&#8221; and &#8220;Emoji &amp; Symbols&#8221;. Should you not want them to appear, you can change the text so that it is &#8220;Edit &#8221; (with an extra trailing space).</p>
<p>For non-English systems you will need to provide a Dynamic Constant to use in place of the hard-coded text of &#8220;Edit&#8221; on the EditMenu. This dynamic constant needs to have the appropriate translation for Edit as required by macOS.</p>
<p>Here&#8217;s how you can set this up for a variety of languages.</p>
<p>Added a public Dynamic Constant to App:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4957" src="https://blog.xojo.com/wp-content/uploads/2018/09/2018-09-17_11-54-48.png" alt="" width="990" height="196" /></p>
<p>Then use it in the menu:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4958" src="https://blog.xojo.com/wp-content/uploads/2018/09/2018-09-17_11-55-09.png" alt="" width="991" height="196" /></p>
<p>When you run the project with French set as the primary language you will see &#8220;Démarrer Dictée&#8221; in the Édition menu:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4959" src="https://blog.xojo.com/wp-content/uploads/2018/09/2018-09-17_11-56-11.png" alt="" width="247" height="225" /></p>
<p>Do the same thing for other languages you need. The easiest way that I found to determine the correct word was to change your System Language and then start a built-in Apple app such as Notes or Safari and make a note of what the &#8220;Edit&#8221; menu is called.</p>
<p><a href="http://files.xojo.com/BlogExamples/EditLocalization.xojo_binary_project">Download a project</a> with the above languages in a Dynamic Constant.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>5 Things to Keep in Mind When Localizing Your App</title>
		<link>https://blog.xojo.com/2017/08/03/5-things-to-keep-in-mind-when-localizing-your-app/</link>
		
		<dc:creator><![CDATA[Dana Brown]]></dc:creator>
		<pubDate>Thu, 03 Aug 2017 19:35:35 +0000</pubDate>
				<category><![CDATA[Dev Marketing]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[App Marketing]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Translation]]></category>
		<guid isPermaLink="false">http://blog.xojo.com/?p=2728</guid>

					<description><![CDATA[If your app will be used by people all over the world, take the time to consider localizing it appropriately.]]></description>
										<content:encoded><![CDATA[<p>If your app will be used by people all over the world, take the time to consider localizing it appropriately. Localizing your app is a great way to increase downloads and grow your user base.</p>
<p>Here are 5 basics to consider when localizing your app:</p>
<p><span id="more-2728"></span></p>
<p><strong>1. Different Word Lengths</strong><br />
Some languages, such as German, have longer words than other languages like English. When designing your UI controls, you&#8217;ll need to account for this. A common way is to make the buttons large enough to accommodate the longest text.</p>
<p>You could also add code to the UI controls to have it resize itself if the localized text would not fit. But resized controls can also affect other controls on your layout, so a system like auto-layout can also help greatly to ensure that your UI adjusts itself appropriately when the text changes.</p>
<p><strong>2. Don&#8217;t use Google Translate</strong><br />
Find someone that natively speaks both languages to do your translation. Obviously, you will need more than one person if you are translating to many languages.</p>
<p>Google Translate has its uses, but it&#8217;s translations often have unusual (or wrong) words and phrasing. So even though the text will be in the localized language, it could still remain difficult for native speakers to understand.</p>
<p>You don&#8217;t want your translations to say &#8220;Throw me down the stairs my shoes.&#8221; when it should say &#8220;Toss my shoes down the stairs to me.&#8221;</p>
<p><strong>3. Don&#8217;t forget about dates</strong><br />
Date formats vary, so be sure to consider how they are displayed. What is the date for 3/7/14? Is it March 7th, 2014 or July 3rd, 2014? For internal dates that are not displayed to the user, you should use a standard format, such as SQL Date: YYYY-MM-DD.</p>
<p>When displaying dates, you should always use the user&#8217;s OS settings. This applies to both short dates with just the numbers and long dates where the month and day are spelled out.</p>
<p>And remember the position of each date component. Some places might use &#8220;March 7th, 2014&#8221;, but others would use &#8220;7 march 2014&#8221;.</p>
<p><strong>4. Numbers</strong><br />
As with dates, numbers are also displayed differently. Not all countries use a &#8220;.&#8221; as the decimal separator. Not all countries use &#8220;,&#8221; as the thousands separator. The display of 3456.78 could be &#8220;3,456.78&#8221; is one location, but &#8220;3 456,78&#8221; in another.</p>
<p>Ask the operating system for the values specific to the user&#8217;s system settings.</p>
<p>And as with dates, when using numbers internally always use a standard and consistent format so that you can read them correctly regardless of the localization.</p>
<p><strong>5. Currency</strong><br />
This trend continues with currency. Don&#8217;t presume that &#8220;$&#8221; is the currency symbol. As above, you should ask the OS for the specific currency symbol. And when storing currency values, do not include the currency symbol as that could make doing math on the values more difficult.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Localizing Web Apps: Dates &#038; Numbers</title>
		<link>https://blog.xojo.com/2017/01/24/localizing-web-apps/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 24 Jan 2017 23:57:49 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[webdev]]></category>
		<guid isPermaLink="false">http://blog.xojo.com/?p=2219</guid>

					<description><![CDATA[In desktop apps, you can use Xojo.Core.Locale to get the user&#8217;s locale for formatting dates and numbers. However, in a web app this value returns&#8230;]]></description>
										<content:encoded><![CDATA[<p>In desktop apps, you can use <a href="http://developer.xojo.com/xojo-core-locale">Xojo.Core.Locale</a> to get the user&#8217;s locale for formatting dates and numbers. However, in a web app this value returns the locale used by the web server rather than the locale of the current user session.</p>
<p>To display dates formatted in the locale of the user session, you need to get the LanguageCode from WebSession and use that to create a locale that you can then use to display the date.</p>
<p><span id="more-2219"></span></p>
<p>This code (in a WebLabel Shown event handler) gets the language code for the user session and then uses it to display the current date:</p>
<pre>Dim langCode As Text = Session.LanguageCode.DefineEncoding(Encodings.UTF8).ToText
Dim locale As New Xojo.Core.Locale(langCode)
Me.Text = Xojo.Core.Date.Now.ToText(locale, _
  Xojo.Core.Date.FormatStyles.Long, _
  Xojo.Core.Date.FormatStyles.None)</pre>
<p>When the browser is set to English, this displays: January 9, 2017</p>
<p>When it is set to French, this displays: 9 janvier 2017</p>
<p>Use the same technique with number formatting. This code (in a WebLabel Shown event handler) gets the language code for the user session and then uses it to display a formatted number:</p>
<pre>Dim langCode As Text = Session.LanguageCode.DefineEncoding(Encodings.UTF8).ToText
Dim locale As New Xojo.Core.Locale(langCode)
Dim num As Double = 1234.56
Me.Text = num.ToText(locale, "#,###.##")</pre>
<p>When the browser is set to English, the number displays like this: 1,234.56</p>
<p>When it is set to French, it displays like this: 1 234,56</p>
<p>To get both the language and region information, you should check the value of the &#8220;Accept-Language&#8221; HTTP header:</p>
<pre>Dim langHeader As String = Session.Header("Accept-Language")</pre>
<p>Which returns both the language and region code in a format like this: en-US.</p>
<p>Note that there may be more than one value returned in this header so you may need to parse it to ensure you get the value you actually want.</p>
<p>Refer to <a href="http://developer.xojo.com/localization">Localization in the User Guide</a> for more information on how to localize your desktop, iOS and web apps.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
