Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Concerned,

I am new and working in pvt company which have maximum Client from UP goverment organisations so they require the application are bialinguals(English and Hindi) and support to Hindi font in all Browser i was used culture (and Font Kruti Dev 10) for it. It 's work only Internet Explorer Browser upto IE8 and after IE9 or other browsers are not supported.
And here used the Global resoures and Themes in Hindi and English
How Can i resolve this problem ??
and Also I want to embedded font in application ??
My code for culture in Base pase are used in every web page this type -----

C#
public class BasePage : System.Web.UI.Page
{
    public const string LanguageDropDownID = "ctl00$ddlLanguage";
    public const string PostBackEventTarget = "__EVENTTARGET";
    public static CultureInfo Culture;
    public static DateTimeStyles Style;
    public BasePage()
    {


        if (DateTime.Now < DateTime.Parse("01-Jan-14 11:59:59 PM") && DateTime.Now > DateTime.Parse("01-Jan-01 12:00:00 AM"))
        {
            Culture = CultureInfo.CreateSpecificCulture("en-GB");
            Style = DateTimeStyles.None;
        }
        else
            throw new Exception("Your Licence Period is expire please Submited your due payment & Conntinue your Services !");

       // Culture = CultureInfo.CreateSpecificCulture("en-GB");
        //Style = DateTimeStyles.None;
    }
    protected override void InitializeCulture()
    {
        ///<remarks><REMARKS>
        ///Check if PostBack occured. Cannot use IsPostBack in this method
        ///as this property is not set yet.
        ///</remarks>
        if (Request[PostBackEventTarget] != null)
        {
            string controlID = Request[PostBackEventTarget];

            if (controlID.Equals(LanguageDropDownID) || controlID.Equals("ddlLanguage"))
            {
                Session["LanguageChanged"] = true;
                string selectedValue =
                       Request.Form[Request[PostBackEventTarget]].ToString();

                switch (selectedValue)
                {
                    case "1": SetCulture("en-GB", "en-GB");
                        break;
                    case "2": SetCulture("hi-IN", "hi-IN");
                        break;
                    default: break;
                }
            }
            else
                Session["LanguageChanged"] = false;
        }
        else if (Session["MyUICulture"] == null)
        {
            SetCulture("hi-IN", "hi-IN");
            Session["LanguageChanged"] = false;
        }
        else
            SetCulture(Session["MyUICulture"].ToString(), Session["MyUICulture"].ToString());

        ///<remarks>
        ///Get the culture from the session if the control is tranferred to a
        ///new page in the same application.
        ///</remarks>
        if (Session["MyUICulture"] != null && Session["MyCulture"] != null)
        {
            Thread.CurrentThread.CurrentUICulture = (CultureInfo)Session["MyUICulture"];
            Thread.CurrentThread.CurrentCulture = (CultureInfo)Session["MyCulture"];
        }
        base.InitializeCulture();
    }
    protected void SetCulture(string name, string locale)
    {
        Thread.CurrentThread.CurrentUICulture = new CultureInfo(name);
        Thread.CurrentThread.CurrentCulture = new CultureInfo(locale);
        ///<remarks>
        ///Saving the current thread's culture set by the User in the Session
        ///so that it can be used across the pages in the current application.
        ///</remarks>
        Session["MyUICulture"] = Thread.CurrentThread.CurrentUICulture;
        Session["MyCulture"] = Thread.CurrentThread.CurrentCulture;

    }
    protected void Page_PreInit(Object sender, EventArgs e)
    {
        if (Session["MyUICulture"] != null)
        {
            if (Session["MyCulture"].ToString() == "hi-IN")
                this.Page.Theme = "Hindi";
            else
                this.Page.Theme = "English";
        }
        else
            this.Page.Theme = "Hindi";
    }

}




Please Resolved Step by Steps....
Posted
Updated 29-Sep-13 22:30pm
v4
Comments
[no name] 30-Sep-13 4:55am    
Do u mean, unicode font is not recognized by browser..? If yes, just add font-family Ms arial uni
Faizymca 30-Sep-13 5:39am    
Thanx sharbarnadh sir, but i used arial unicode MS in .css or controls but not works..
Faizymca 30-Sep-13 6:47am    
how can i use of Font:"Arial Unicode MS" in my application i check to control property change the name Font-Names="Arial Unicode MS" but it 's not work. i think i have not install in my pc so where is free downloaded file i searched but not found the font setup file..
Faizymca 7-Oct-13 0:29am    
Dear Sharbarnadh, how can download the setup file of Arial Unicode MS from site ??
pls give suggession to how can i use of this
font ???
Faizymca 2-Nov-13 7:39am    
Dear shabarnath Sir, please give reply regarding to unicode font....i eagerly waiting.....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900