Skip to content

Commit

Permalink
scoping
Browse files Browse the repository at this point in the history
  • Loading branch information
jmohler1970 committed Oct 29, 2018
1 parent 2959953 commit b44e8b6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions i18n.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,18 @@ void function setupRequest() {
string function geti18n(required string key, any placeholder = [], string lang = "en-US") {

// lang could be powered by cgi.HTTP_ACCEPT_LANGUAGE

arguments.lang = arguments.lang.listfirst();


if (!isArray(arguments.placeholder)) {
arguments.placeholder = [arguments.placeholder]
};


if (CacheIdExists(arguments.lang, variables.cache.language)) {

var stLang = cacheGet(arguments.lang, variables.cache.language);


if (stLang.keyExists(arguments.key)) {

myString = stLang[arguments.key];
var myString = stLang[arguments.key];

for (var i in arguments.placeholder) {

Expand Down

0 comments on commit b44e8b6

Please sign in to comment.