Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

كيف يمكنني تغيير ال CSS للموقع مع تغيير اللغة العربية ؟

عند تغيير لغة الموقع للعربية يبقى التصميم كما هو في اللغة الإنجليزية

user-image
Question added by Mohammed Ali AL-Malahi , Software Engineer and Deputy Supervisor for the Application Management Unit , King AbdulAziz University
Date Posted: 2013/06/29
Deleted user
by Deleted user

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.

Fadi Alkhateeb
by Fadi Alkhateeb , Senior Front End Developer , NexTwo

السلام عليكم، هنالك عده تغييرات يجب عليك القيام بها في CSS للحصول على واجه العربية لموقعك، هذه التغييرات تشمتل تغيير الخصائص التاليه:1.
Direction: اضافة (direction:rtl) ل (body) أو (html) او ايه مغير لديك في CSS عرفت له هذه خاصيه.2.
Text Alignment.3.
Margin/ Padding4.
Float5.
Background images position.

أعاني من نفس المشكلة و هي أن الرقام تظهر بشكل معكوس عند العرض في الويب

متال : سورة البقرة

ali ibrahim Yousry
by ali ibrahim Yousry , UI-UX Dev Specialist & Sr. SharePoint Designer , Saudi Commission for Tourism and National Heritage (SCTH)

السلام عليكم تستطيع وضع هذا الكود في ملف الاستايل body{ direction:rtl;}

Mamdouh Emam
by 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"; }

More Questions Like This