This repository has been archived by the owner on Nov 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
File reader
Alexanderius edited this page Sep 20, 2014
·
1 revision
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 AcspNet principles
- AcspNet controllers
- Controllers basics
- Controllers attributes
- Controllers routing
- Controllers responses
- Controllers properties
- Controllers model binding
- AcspNet views
- AcspNet templates
- Template factory
- Data collector
- String table
- File reader
- AcspNet context
- Environment
- Language manager
- Redirector
- HTML