Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 5th, 2006, 08:46 AM
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default conditional inclusion of a namespace

Hi all,

I m working on a multilanguage project in ASP.net C# v2.0.
I created a namespace "language.eng" and defined some text string within it.

Now, I want to include it after checking the configuration is set to language english.

let say if(Session["lang"].tostring() == "english") then I want to include this namespace
so that I can use the strings value...

Same if(Session["lang"].tostring() == "spanish") then I want to include "language.spenish" namespace.

How can I do this.

Please help.

Thanks in Advance.

Suman Singh
 
Old September 6th, 2006, 03:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

Why namespaces and why not resources files?
With resource files you get so many things done already
for you by the framework, you can setup your app to
load a particular language resource file based on the culture
detected and many other routine issues like that.

Regards
Ankur





Similar Threads
Thread Thread Starter Forum Replies Last Post
ch 8 "validate against inclusion in a list" [email protected] BOOK: Beginning Ruby on Rails 5 July 20th, 2010 07:02 PM
regarding conditional statements abhi.prince4u XSLT 1 July 21st, 2007 06:00 AM
conditional IF roy_mm Reporting Services 0 October 30th, 2006 07:52 AM
Conditional selecting Broodmdh SQL Server 2000 4 August 16th, 2006 12:22 PM
Conditional Formatting Corey Access 1 November 8th, 2005 12:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.