F
F
fa1con2017-05-09 12:41:09
ASP.NET
fa1con, 2017-05-09 12:41:09

How to store text that needs localization?

Web api 2 application. There is an entity created from the admin panel, it has a Name field that needs to be shown to the user. How to store this field if localization is required? At least En/Ru/Fr.
So far, two ways have come to mind, to store in the database -
1) a model with the fields NameEn ,NameRu, NameFr
2) As well as a model with the fields Name, Lang
Can there be support for such as resource files in asp net out of the box? Something I could not find anything on the topic. Or any best practice?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2017-05-09
@tsklab

How to store text that needs localization?
In a field whose type supports unicode is nvarchar.
If you need to show the language of the text, then add the appropriate field.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question