This repository was archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
File reader
Alexanderius edited this page Feb 14, 2016
·
3 revisions
FileReader is a class for loading localizable text files from specifed in AcspNet configuration data folder.
File name should contain language prefix.
For example, if you loading file Menu.xml, then it should be named Menu.{language}.xml in data folder.
File will be loaded for current language, if current language file does not exist, then the file for default language will be loaded.
public class MyController : Controller
{
public override ControllerResponse Invoke()
{
// It loads Menu.en.xml file
var myData = FileReader.LoadXDocument("Menu.xml");
...
}
}public class MyController : Controller
{
public override ControllerResponse Invoke()
{
// It loads Menu.en.xml file
var myData = FileReader.LoadXDocument("Menu");
...
}
}public class MyController : Controller
{
public override ControllerResponse Invoke()
{
// It loads Menu.en.xml file
var myData = FileReader.LoadTextDocument("SomeFile.html");
...
}
}- Getting Started
- Main Simplify.Web principles
- Simplify.Web controllers
- Simplify.Web views
- Simplify.Web templates
- Simplify.Web configuration
- Templates variables
- Static content
- Template factory
- Data collector
- String table
- File reader
- Web context
- Environment
- Language manager
- Redirector
- HTML