-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyApplication.cfc
44 lines (26 loc) · 965 Bytes
/
MyApplication.cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
component extends="framework.one"{
function setupApplication() {
include "config/config.cfm";
application.general.root = getDirectoryFromPath(getCurrentTemplatePath());
application.general.rootpath = getDirectoryFromPath(getCurrentTemplatePath());
}
function setupEnvironment( env ) { }
function setupSession() {
}
public function setupRequest() {
}
function setupResponse( rc ) {
}
function setupSubsystem( module ) { }
function setupView( rc ) {
arguments.rc["_"] = geti18nText;
}
string function geti18nText(string key){
var stI18n = application.i18n[request.security.getCurrentLanguage()];
if(structKeyExists(stI18n,arguments.key)){
return stI18n[arguments.key];
}else{
return request.security.getCurrentLanguage() & ": " & arguments.key;
}
}
}