Hello Everyone,
I am working on website development in asp.net. where i have used Master Page concept and content page. and by using dropdownlist I am changing its language.
I am working on website development in asp.net. where i have used Master Page concept and content page. and by using dropdownlist I am changing its language.
Folder Hierarchy :
-----------------------------------------------------------------------------------------------------------------
Solution Localization Demo Solution Localization Demo
Localization Demo Localization Demo
App_Code App_Code
App_Data App_Data
App_GlobalRsources App_GlobalRsources
App_LocalResources App_LocalResources
ContentPage.aspx.ar.resx ContentPage.aspx.ar.resx
ContentPage.aspx.hi.resx ContentPage.aspx.hi.resx
ContentPage.aspx.de.resx ContentPage.aspx.de.resx
MasterPage.aspx.ar.resx MasterPage.aspx.ar.resx
MasterPage.aspx.hi.resx MasterPage.aspx.hi.resx
MasterPage.aspx.de.resx MasterPage.aspx.de.resx
Bin Bin
PagesFolder ContentPage.aspx
ViewPagesFolder ContentPage.aspx.cs
ContentPage.aspx MasterPage.master
ContentPage.aspx.cs MasterPage.master,cs
MasterPagesFolder web.config
MasterPage.master
MasterPage.master.cs
web.config
----------------------------------------------------------------------------------------------------------------
Fig .No. 1 (with Pages Folder) Fig .No. 2 (Without Pages Folder)
-----------------------------------------------------------------------------------------------------------------
but if I changed something like [refer fig. no. 1 ] added one folder and add actual content file inside it. then website stops localization process.
how to call that App_LocalResource Files.
Iftikar HussainPosted Jul 4, 2013, 4:47 AM
Regards,
Iftikar
Rohit MorePosted Jul 4, 2013, 5:15 AM
Suppose In project there are 5 files (.aspx) and each can contain more than 15 components and I need to store each Text and its Tooltips.
-----------------------------
Situation :
Files - 5
Components - 15
Stirings to be localized - 2 (Text and Tooltip)
-----------------------
Total : 5*15*2 = 150 strings in 1 file for per Language.
I think it would become very complicated na.
I will appreciate , if you will provide any example.
Regards :
Rohit More
Iftikar HussainPosted Jul 4, 2013, 5:04 AM
Regards.
Iftikar
Rohit MorePosted Jul 4, 2013, 5:00 AM
Please find out Enclosed Localization small Demo attachment.
Rohit MorePosted Jul 4, 2013, 4:37 AM
In this way I am creating resource key for each component.
----------- In ContentPage.aspx.hi.resx ----
lblFirstNameResource.Text -> "Some Value"
-------------
I am keeping .resx files in App_LocalResources.
I tried to move in App_GlobalResources. but getting error
"The resource "lblFirstNameResource.Text" is not valid identifier".
Regards : Rohit More
Iftikar HussainPosted Jul 4, 2013, 4:23 AM
Is it necessary for you to create Page folder?
Can you check by putting your resource file in App_GlobalResources and bind the control as
Can you provide me how you are bind the resource value to each control?
Regards,
Iftikar
Rohit MorePosted Jul 4, 2013, 4:15 AM
Iftikar HussainPosted Jul 4, 2013, 3:16 AM
Lets say you want to change language either English (United States) or German (Germany).
The culture name from this: en-US and de-DE.
So you create two resource file under App_GlobalResources as
ProjectResources.en-US.resx and
ProjectResources.de-DE.resx
In your aspx page