Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Application Language Texts in Database #2571


User avatar
0
bilalhaidar created

Hi, I read somewhere that the Module Zero() makes use of the Database to store Application Language Texts.

Now, in the template I downloaded, it makes use of Embedded Application Language Text files.

My question is, isn't this template using Module Zero()? If not, how can i store Application Language Texts in Database?

Thanks


8 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    In LanguageManagement, when you edit language texts, they are saved to DB. You can check this document for how to do it <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide-Core#language-management">https://aspnetzero.com/Documents/Develo ... management</a>.

  • User Avatar
    0
    bilalhaidar created

    So basically, first time the application runs, the XML files are stored in the database?

    So, should I add more keys for my application in the XML files or through the website? I am confused here.

    Thanks, Bilal

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    This document explains it deeper <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Zero/Language-Management">http://aspnetboilerplate.com/Pages/Docu ... Management</a>.

  • User Avatar
    0
    bilalhaidar created

    Hi,

    I read this documentation.

    Basically, it falls back to XML files when a key is not found in DB.

    Then it says this: So, when you need to a new localized text, define it into XML files as you do normally. You should at least define it in default language's XML file. Also thus, you don't need to add default values of localized texts to database migration code.

    Does this mean that when I want to add new keys, I add them to XML file. Then the system would know that there is a new key and it will add it to Database? Or the keys I add to XML will stay there always and not get inserted into DB?

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Yes, first you need to add it to XML but it is not saved to DB in the beginning. When a user changes it's value using UI, the changed value is added to database. When a new value is entered for this key in a different language it is saved to database as well.

    You can think the values in xml is the default value for that key if there is nothing defined in database or other languages.

  • User Avatar
    0
    bilalhaidar created

    OK Thanks.

    So it is safe to just add my keys to XML. Shall I go and save all values on the web app so that they all get into DB or there is no need?

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    No you don't have to save any of them, just add your keys to XML files, it is safe.

  • User Avatar
    0
    bilalhaidar created

    Thanks a lot