aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libLumina/LuminaUtils.cpp')
-rw-r--r--libLumina/LuminaUtils.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index 0e836748..cad7f817 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -326,6 +326,14 @@ void LUtils::setLocaleEnv(QString lang, QString msg, QString time, QString num,Q
}
}
+QString LUtils::currentLocale(){
+ QString curr = getenv("LC_ALL");// = QLocale::system();
+ if(curr.isEmpty()){ curr = getenv("LANG"); }
+ if(curr.isEmpty()){ curr = "en_US"; }
+ curr = curr.section(".",0,0); //remove any encodings off the end
+ return curr;
+}
+
double LUtils::DisplaySizeToBytes(QString num){
//qDebug() << "Convert Num to Bytes:" << num;
num = num.toLower().simplified();
bgstack15