Add user_check config option for deletion warning dialogues
[potlatch2.git] / net / systemeD / potlatch2 / CustomLocaleCommand.as
1 package net.systemeD.potlatch2 {
2     import org.babelfx.commands.ExternalLocaleCommand;
3     import net.systemeD.halcyon.Globals;
4
5     public class CustomLocaleCommand extends ExternalLocaleCommand {
6         public var defaultExternalPath:String;
7
8         override protected function loadLocale(locale:String):void {
9             externalPath = defaultExternalPath;
10
11             if (Globals.vars.locale_paths) {
12                 for each (var path:String in Globals.vars.locale_paths.split(";")) {
13                     var args:Array = path.split("=");
14
15                     if (args[0] == locale) {
16                         externalPath = args[1];
17                     }
18                 }
19             }
20
21             super.loadLocale(locale);
22         }
23     }
24 }