تم إضافة السؤال من قبل
Mohammed Ali AL-Malahi
, Software Engineer and Deputy Supervisor for the Application Management Unit , King AbdulAziz University
تاريخ النشر: 2013/06/29
Generally in such scenario, a separate CSS file can be created and when the application is being loaded depending on the culture (locale) of the user can be found using Namespace "System.Globalization.CultureInfo" and load the css dynamically.
Instead, we can even having the culture specified in Web.Config, so that it can be configurable based on deployment server. Then latter the same approach for loading the CSS file can be applied.
In Web.config, under "System.Web" tag, add "" tag. Then the below will work fine.
The below code will also work fine, instead of the above.
السلام عليكم،
هنالك عده تغييرات يجب عليك القيام بها في CSS للحصول على واجه العربية لموقعك، هذه التغييرات تشمتل تغيير الخصائص التاليه:1. Direction: اضافة (direction:rtl) ل (body) أو (html) او ايه مغير لديك في CSS عرفت له هذه خاصيه.2. Text Alignment.3. Margin/ Padding4. Float5. Background images position.
من قبل
Mamdouh Emam , Specialist Full Stack Developer , Tas'heel Finance
السلام عليكم
the best practice for this is to have2 css files, one for English and the other for arabic. and upon language change from the UI, you can load the corresponding file like below
in the aspx:
in the code behind:
check the language and load the css
if (Session["Lang"].ToString().Startswith("en"))
{
StyleLink.Href = "~/Style/EnglishStyle.css";
}
else
{
StyleLink.Href = "~/Style/ArabicStyle.css";
}