Good morning
I have been trying to figure something our for the last few days but I wasn’t able to do so, so I need your help for a few questions, that I think are fairly simple. But since I just started using Xojo for the Web, I am still not clear on a few issues… Furthermore, please keep in mind that I am not a professional developper, only a hobbyist.
First off, some background: I am working on a Website for our baseball association. It will eventually have a few pages, including a schedule, automatic emailing and a few other things. I was able to figure out how to check for a mobile device and I will eventually create some pages for those. But my main problem is that it has to be available in both, English and French. So here are my questions:
-
In RB/Xojo, when I need two languages in the same application, I usually create windows based on one language, and access, either a database of all the needed translations or some constants, depending on the size of the application and just fill the elements (like the labels, button, etc.) with the correct language when there is a language change. Is it the same for the Web or do I have to create two different sets of Webpages?
-
Like a lot of Website I see out there, I would like to access the address bar and retrieve the language selected. For example, www.mywebsite.com/en/. I tried to work with the HandleSpecialURL event but I keep getting a 404 error. Could somebody point me in the right direction on how to check for that and on how to direct the browser to the correct pages?
-
I guess, when I have the answer to my previous question, I will be able to navigate the site based on the address bar… For example, if somebody types in the www.mywebsite.com/en/schedules/ address, I will be able to show the Schedules page in English…
-
Also, again, I have seen this on some Websites, how can I direct the user to my own 404 error page instead of a generic one?
Any insights, suggestions and coding examples would be greatly appreciated.
Sincerly,
Rick