ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

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

user-image
تم إضافة السؤال من قبل 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.

Fadi Alkhateeb
من قبل 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.

Moslem Ali
من قبل Moslem Ali

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

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

ali ibrahim Yousry
من قبل ali ibrahim Yousry , Sharepoint Expert-Frontend Developer Consultant , جامعة الإمام محمد بن سعود الإسلامية‎

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

Mamdouh Emam
من قبل 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"; }

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟