Skip to content

Tag: App Localization

macOS: Add More Options to the Window Menu

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 “extended” screen in your macOS setup. Read on, adding these options to your Xojo-built macOS apps is just a few Declares away!

Comments closed

The Versatility of Xojo

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.

Comments closed

Guest Post: Adding Language Translation to Your Xojo Apps

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 Google Translate. However, they wanted the translation function to be built directly into the app and to be performed “on demand.”

I did some research and found that Amazon provides a service that does exactly what the client was asking for. The service, called Amazon Translate, is available as one of many services that are available through Amazon Web Services.

In this post, I’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’ll use the MBS Xojo CURL Plugin, which makes calling the Amazon Translate API easy. But first, let’s learn a little about Amazon Translate.

Comments closed

Localize Your Edit Menu on Mac

On macOS you may have noticed two special menu items that appear at the bottom of the Edit menu: “Start Dictation” and “Emoji & Symbols”. These menu items are added automatically by macOS provided your Xojo app follows a few simple rules.

Comments closed

Localizing Web Apps: Dates & Numbers

In desktop apps, you can use Xojo.Core.Locale to get the user’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.

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.

Comments closed