How to do localization without a resource file?

Articles from the Internet, they all make the localization database in the resource file xxxx.resx

Is there a way to read resources from a database?

+5
source share
2 answers

The ASP.NET resource provider model is extensible - so you can create your own resource provider and plants to get resources from the database. See the following article for more information:

Extending the ASP.NET 2.0 Resource Provider Model

ASP.NET 2.0: Custom Resource Provider Using Sql Database

+6
source

yes, you can store localized data in the database, and not in the * .resx file

,

CREATE TABLE [LocalizedData]
(
  [Identifier] varchar(50) NOT NULL,
  [Language] varchar(5) NOT NULL,
  [Title] nvarchar(50),
  [Description] nvarchar(200),   
  PRIMARY KEY ([Identifier], [Language])   
)

 INSERT INTO [LocalizedData] ([Identifier], [Language], [Title], [Description])

      SELECT 'String1', 'en', 'first entry', 'This is my first entry'
+2

All Articles