KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Displaying localizable static text in your 4D interface
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: September 28, 2001

4D allows you to display static texts in your dialogs. However, static texts in 4D are... static. Thus it is not easy to update your database quickly when you need to localize your interface.

The first solution is to use variables. You can store your information in your data file or a list, copy them into arrays, and display them in non-enterable variables. The problem is that you may duplicate data, and you might be faced with non-enterable variables that may not be displayed in the same way as enterable variables for all platform interfaces. They may be displayed with an undesirable background.

The second solution is to display them nested into static texts. You can create a static text and nest your 4D variable inside this static text. To nest a 4D variable, you need to define it between the < and > characters (Ex: or <<>MyInterprocessvariable> ). In this case, the variable will always be displayed as a static text.

However, this will never fix the problem of localization and data storage. The best solution is to use STR# resources. You can nest the call to your STR# in your static text (e.g. ":15000,1" for hard-coded values or ":<>MyRange,<>MyItem" if I want to use variables instead of hard coded values).

Please note that for the two latest solutions, you can't change them on the fly if your dialog is already displayed. This is the current behavior.