Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General Discussion » View Thread |
Messages 1 to 2 of 2 total |
Multi Language Support |
Mon, May 6 2013 8:00 AM | Permanent Link |
Christian Kaufmann | I need to have my web app in different languages. The initial language
should be choosen based on the browser language/headers. But the user should be able to change to another (available) language as well. I suppose, I'm not the first one, who has to do that: * Detect language: There is the navigator.language property, but this is missing in WebDOM. Can I just add it there? Or is there a reason, that it is not there? * Does somebody have a good pattern to translate forms (TLabel.Caption, TButton.Caption, and others)? * How to translate FormatSettings.Translations? FormatSettings.Translations.Values['DLG_BTN_CLOSE'] := "Schliessen"; Or is there a more efficient way? cu Christian |
Tue, May 7 2013 4:25 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Christian,
<< * Detect language: There is the navigator.language property, but this is missing in WebDOM. Can I just add it there? Or is there a reason, that it is not there? >> Yes, you can just add it. I'll add it on this end, and it should look like this: external TNavigator = class public { Properties } property appCodeName: String read; property appName: String read; property appVersion: String read; property cookieEnabled: Boolean read; property language: String read write; // Not supported by IE property mimeTypes: TMimeTypeList read; property platform: String read; property plugins: TMimePluginList read; property userAgent: String read; property userLanguage: String read write; // IE-only { Methods } function javaEnabled: Boolean; end; The reason that it's not there is that this property isn't standardized across all browsers, and I'm basically adding non-standard extensions as they come up. << * How to translate FormatSettings.Translations? FormatSettings.Translations.Values['DLG_BTN_CLOSE'] := "Schliessen"; >> That's the way to do it. Just do it once in the initialization section of your main form (or in the main program source), and you'll be all set. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |