i am trying to programatically change the page culture and uiculture ( c# ), my webpage needs to have 2 languages and i have prepaired the right resource files ( .resx) and they are functional since when i try writing in the web.config culture="ar-LB" it works fine

now i understand that the setting of the cultures should be done in the preinit of the page
i am doing so still the page does not change languages when trying to do so programatically

does anyone have an idea about why this is happening ????

What code are you using to set the culture programaticaly?

if your site has a feature to allow user to choose their preferred language(on website landing page you ask user to pick their preffered language), you need to overrider InitializeCulture method of page class and set appropriate value.
For Example.

Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(selectedLanguage);

More detail example this link will help you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.