I am working on a localization project, some of the localized text are in graphics, some of the example graphics paths:
/en/images
/es/images
/fr/images
My web forms use <asp:image> controls and <img> tags (runat = sever) to point to graphics in /en/images. I need to a function to loop through all image control and point them to different paths based on the locale set at runt time. Which event should I override and how do I write it?
All my web pages inherit from a base page, I don't know if that makes differences.
I have a problem with my paths.hen I look at the default page that has my logo on the site.master the image (on site.master) shows fine in my browser:http://localhost:50033/Img/Logos/ahn_logo.pngAs soon as I click on a link like "About Us" the view gets returned but the image path is now:http://localhost:50033/Home.aspx/Img/Logos/ahn_logo.pngand it does not show.Why does the path of the master page image change ?
We have a multilingual site, or culture-sensitive, and some of the static content now needs to be targeted; for this I'm using themes as it seems the easiest way to achieve what I want, but I can't for the life of me get the images to pick up.I'm setting the theme in code-behind, and thought at first that maybe this was the issue, but on checking up it looks like I'm doing the right thing (setting on Pre-Init).
I expect to be able to reference images using relative paths where App_Themes/ThemeName/ is automatically resolved, such as:
For whatever reason, however, the image isn't being pulled through at all.This is the code we have in place for setting the theme (the only really relevant part, I'm sure, being the Theme = CurrentSite.CultureName, which is applied successfully):
Private Sub SetTheme() Dim themesPath = Server.MapPath("~/App_Themes") If Directory.Exists(themesPath) Then[code]...
In the above code, CurrentSite.CultureName would be a language culture name (for example, en-gb, or nn-no) that does have an existing corresponding theme folder containing all required resources.Pages do have EnableTheming set to True. Also, I have tried removing the theme-setting code and applying the theme in the page using Theme="en-gb" to no avail.
Is there anything immediately evident as to why the URLs aren't resolved?
I've been assigned a task to get a site ready for migration over to a load balanced architecture. It will have 4 active servers and 2 static, where the active ones will contain the main site, with the static ones containing images, text files etc..My question is, what is the best way to deal with the image paths in this situation?e.g. one one server the image will be something like : 'serverONE/images/image.jpg' but this need the ability to change to 'serverTWO/images/image.jpg'
I have mulitlanguage platform in place - need to have the HEADER LOGO.PNG on my site to change with my language-button function.My startingpoint is this from my Masterpage :
I have a pesky problem: if I change the UI culture dynamically and then I reload a page, the Resources.resx file selected was changed into the page but not into the Update Panel.
How to get the selected "current language for non-unicode programs" of system in .net programetially? you can see the "current language for non-unicode programs" in the following path in wista control panel -> Clock, Language and Region -> Regional and language options -> Administrative(tab) -> Language for non-unicode programs
I Want to change nativeculture to culturename asp.net With CultureInfo in System.Globalization for exmaple i have nativename="English" Now I Want to Change CultureName="en"
I have localized application where user can choose her preferred language in dropdown control. After OnSelectedIndexChanged event there is postback and CurrentThread.CurrentCulture should be set to what user chooses.
Login.aspx.cs public partial class Login : BasePage { protected void LanguageDrop_changed(object sender, EventArgs e) { var lang = LanguageDropDown.SelectedValue; Thread.CurrentThread.CurrentUICulture = new CultureInfo(lang); Thread.CurrentThread.CurrentCulture = new CultureInfo(lang); } }
However, it does not work correct because LanguageDrop_click event fires after InitializeCulture so some default culture is initialized, controls are localized to default language and then CurrentThread.CurrentCulture is set. So user have to refresh page once more to see them in chosen language.
UPDATE: I found partial answer: [URL] He retrieves language dropdown value in InitializeCulture() event from Form collection
How is it possible to change the CurrencyGroupSeparator for a special language? It would be nice if i could change it once and the it will work on the entire site.
i am facing a problem to change the date format in label.
i get the date from database with format("yyyy-MM-dd")
[Code]....
however, when it display to the label, it change to different date format because it follow the date format which is set in control panel. how to make the date display in label to a fix format? i want the date format ("yyyy-MM-dd"). the below coding is fail.lbl_approval_approve_date.Text = Format(lbl_approval_approve_date.Text, "yyyy-MM-dd") the date will display in excel which i generate it to report viewer.
I have no knowledge about sessions but I realize that using sessions in multi-language sites are very useful. How can I implement language selection by using sessions and sql database?
We have some software that works with a sql database, our customers want to use japanese characters. When they try and use it with our softare and save the characters through a form, the characters get corrupted. They have said that if we change the charater encoding in our database that we can save jap characters. What im workdering is if we do this will it affect the current data and do our forms have to be rewritten to handle these characters?
I am watching a microsoft video tutorial about localization. I succesfully made it work but I have some questions. In video tutorial, the guy is using a dropdownlist with autopostback to select the preffered language. After the dropdownlist selection, initializeculture() sub is executing and from resources is reading the values for selected language..
Partial Class _Default Inherits System.Web.UI.Page Protected Overrides Sub InitializeCulture()
[Code]....
At the above example, the value for a selected language, is at the dropdownlist control.
a)How am I going to have the same result but, instead of dropdownlist control I would like to use imagebutton controls for the languages. Do I have to store to a hidden text box the value from the imagebutton that is clicked..?
b)How will my website remember the selected language for all pages..? Should I use cookie, session variables..; Which is the most famous approach for developing a multilanguage website with imagebutton controls..?
I need to create my first (and simple) .net 4 web application that needs to be viewed in English, French and Italian. I've created and tested a sample web application that works fine with implicit and explicit localization set via web browser language preferences.
Now I'd like to add a simple Combo Box in the master page or in the login page to let the user choose the preferred language and would like the site to change its language based on this. I do not know how to start and to accomplish this task.
I need to be able to change the resource file used by an ASP.Net Page based on some value other than Culture/Language/Region. The purpopse is to simply configure properties on the page based on a city or site name or other criteria. I do not want to change language or culture/region.