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

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

متابعة

my website supports multi-language which is better to use resource file or databse??? and what are the advantages & disadvantages for each one?

user-image
تم إضافة السؤال من قبل marwa khalaf , .Net Developer , Sands National Academy
تاريخ النشر: 2013/05/26
Hamzeh Abu Zakham
من قبل Hamzeh Abu Zakham , Director of Software Development , bayt.com

if you are looking for performance, static language files sourcing is the best approach.
if you are looking for ease of manipulation, and editing, you need a dynamic storage, a key value store in memory would be a good alternative than traditional relational databases.

مستخدم محذوف‎
من قبل مستخدم محذوف‎

If i was in yuour shoe i'd use both, i'd use Database for the texts that are used more than once as changing the text in this case would be easier you'll have to change on one place only, and use a resource file for the texts used only in specific cases as depending totally on DB would slow down the process, for generic texts use DB and cache these texts to reduce number of hits on DB.

مستخدم محذوف‎
من قبل مستخدم محذوف‎

For i18n and l10n resource file is the common approach.

Panneer selvam xavier
من قبل Panneer selvam xavier , Supply Chain Analyst / Trainer , Infonet

Many people use the two terms “web design” and “web development” interchangeably, but they really do have two different meanings.
If you’re looking for a new job or someone to build your website, you need to know the difference.
Web Design Web design is the customer-facing part of the website.
A web designer is concerned with how a site looks and how the customers interact with it.
Good web designers know how to put together the principles of design to create a site that looks great.
They also understand about usability and how to create a site that customers want to navigate around in because it’s so easy to do.
Web Development Web development is the back-end of the website, the programming and interactions on the pages.
A web developer focuses on how a site works and how the customers get things done on it.
Good web developers know how to program CGI and scripts like PHP.
They understand about how web forms work and can keep a site running effectively.

wasseem Abu-zaghlan
من قبل wasseem Abu-zaghlan , Senior Technical consultant , Method

surely resources files better then using DB if thinking about performance issue

Hazem Salama
من قبل Hazem Salama , Senior Member of Technical Staff , Verizon Communications

I'd recommend using a database, that would be more versatile and robust.

Hajjaj Jamal Ali Al Hajjaji
من قبل Hajjaj Jamal Ali Al Hajjaji , Software Engineer , INC Technologies

If you are using more than two languages then use database.

Eman Al-Refaie
من قبل Eman Al-Refaie , Business Analysis Manager , Cloud Solutions

Use local resource, it's faster and no need to write to much code.

Mohammed Rizwan Afgani
من قبل Mohammed Rizwan Afgani , Software Engineer, Team Lead , Prosoft e-Solutions (I) Pvt Ltd

I think you should go with resource Files.
Because ASP.NET and the .NET framework ship with support for multilingual applications, namely in the form of Resource Files, the CultureInfo class, and the System.Globalization and System.Resources.ResourceManager namespaces.
Some of the key highlights are:1.
Content is separated into simple XML files2.
There's a separate XML file for each supported language3.
The code to load values is relatively simple and short4.
The ResourceManager class automatically retrieves the content from the right XML file based on the thread's CurrentCulture value5.
You can easily have1 actual page, for N supported languages.6.
response time is fast, etc.
please refer this article to design multilungal websites: http://www.codeproject.com/Articles/7998/Creating-multilingual-websites-Part-1 Hope you find the answer helpful

Ashraf Sabry
من قبل Ashraf Sabry , Freelancer developer , N/A

It depends on what you are planning to create.
If your web application is serving content that users can't edit, then you should use localized resource files.
If your web application resembles some kind of content management systems, then you should use a dynamic store (usually database).
You may need to use them both: Localized resource files for static content (labels, table headers, email templates,…), and database for the content that users can add or edit.

Fadi Alkhateeb
من قبل Fadi Alkhateeb , Senior Front End Developer , NexTwo

I agree with Hamzeh and Nour.
If you have static content and want to be served fast it will be better to use resources files, also that for text that used once or in some certain places only in the website.
As for dynamic content that changed and editable you will need to use database.

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