Where url.language is triggered when a different language flag is pressed! On the individual pages this is working fine but as soon as I try to add it to my Application.cfc it isn’t any longer? What is the best place within the application.cfc to make this work?
I know I ask a lot of questions right now I try to set up a my own little CMS for my regular clients and new ones coming in. As I said before there are more and more new sites I’m making requiring multiple languages. I feel I’m on the right track, and of most things, I’m actually sure they are okay since they usually work, but that doesn’t mean it is the most appropriate way and I would like to be sure, that’s all.
Oh by the way this is what I have on the different flags:
You thought about looking at Open Source CMSs instead of building your own?
Frameworks like Mura and FarCry are widely support in the community and tools like this are usually “out the box” and come with a pile of other things on top.
I just downloaded Mura and reading into it right now as well!
Where I’m working on now is not really reinventing the wheel It’s more for me to get a way better understanding of what is possible in Coldfusion, more that basic things I have used so far. If I can in a small scale can use that as well would be a plus
Yeah; using a pre-canned software package teaches you nothing about making a wheel, just how to put one already made onto the car. You’ll learn lots more (but spend more time) building your own.
When using URL params, make sure you always sanitize them first.
won’t help you. Because it will be set by the URL, but also changed to ‘blah’. A simple CFCASE check will let you compare it against acceptable values.
Does your website require that the language of the website exists with every page call? If so, I would recommend it be set once and then stored into session for the remainder of the visit (and stored on client cookie for subsequent visits)
If your site DOES require a URL variable on every page call, then having this code on the onRequestStart would probably be sufficient.