> hola cftalk! > if you were making a website multi-lingual, how would > "you" > do it? my first idea, and what ive done so far, is to do > this:
> 1. create an xml doc that has one node for each > "word/group of > words/phrase/label" that appear on the web app. > 2. read that xml doc into a persistent scope (Session > right now) > 3. display #session.label_fortyThree# where the words > might be > is this the best? only? is there a better way? im > thinking that > loading both versions into application var structs (once > on > application start), and then displaying like i was in #3. > im just > thinking outloud here, and kinda just looking for a "what > do you do" > kinda answer. > thank ya! The onTap framework has a built-in architecture for handling localized content and functionality. There are a handfull of functions (2 or maybe 3) for managing the data which essentially is simply stored in a structure in the request scope -- you can of course cache the data in the application scope if you have a large volume of frequently used data in one place. Once that structure is built, you just build your html like normal, exchanging the content you would normally write into the html elements with the names of the variables holding the data. It typically looks something like this: <div> <div>%tap_hello_world</div> <div>%tap_someothercontent</div> </div> When this is displayed, %tap_hello_world and %tap_someothercontent are automatically replaced with the appropriate localized values. The choice of using %tap_ to prefix the variables is completely arbitrary -- it's just what I use to help make namespace conflicts less likely and more manageable. Beyond this, the framework also automatically includes localized directories for the current locale in each stage of the request. So if you're viewing an application page in en_US locale, the framework will automatically include code in /_local/_l10n/en/ followed by code in /_local/_l10n/us/ in the local stage of the request. If the country isn't included in the locale (i.e. the locale is "en" instead of "en_US") the subsequent directories are omitted. The framework also automates the inclusion of locale-specific images. When you create an image using the framework's tools, you provide the image filename (<img src="image.gif" />) and the framework will automatically include /_images/_l10n/en/us/image.gif or /_images/_l10n/en/image.gif if they exist instead of /_images/image.gif. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199657 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

