ÿØÿà JFIF ` ` ÿáfExif MM * i >ê 2 ê ê P ê ÿþ ?CREATOR: gd-jpeg v1.0 (usi
|
Server : Apache System : Linux gains.enterpriseappscloud.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : beyondlimi ( 2438) PHP Version : 7.4.33 Disable Function : allow_url_include, show_source, symlink, system, passthru, exec, popen, pclose, proc_open, proc_terminate,proc_get_status, proc_close, proc_nice, allow_url_fopen, shell-exec, shell_exec, fpassthru, base64_encodem, escapeshellcmd, escapeshellarg, crack_check,crack_closedict, crack_getlastmessage, crack_opendict, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, dl, escap, phpinfo Directory : /home/beyondlimi/public_html/admin/assets/libs/apexcharts/src/modules/helpers/ |
Upload File : |
import Utils from '../../utils/Utils'
import en from '../../locales/en.json'
export default class Localization {
constructor(ctx) {
this.ctx = ctx
this.w = ctx.w
}
setCurrentLocaleValues(localeName) {
let locales = this.w.config.chart.locales
// check if user has specified locales in global Apex variable
// if yes - then extend those with local chart's locale
if (
window.Apex.chart &&
window.Apex.chart.locales &&
window.Apex.chart.locales.length > 0
) {
locales = this.w.config.chart.locales.concat(window.Apex.chart.locales)
}
// find the locale from the array of locales which user has set (either by chart.defaultLocale or by calling setLocale() method.)
const selectedLocale = locales.filter((c) => c.name === localeName)[0]
if (selectedLocale) {
// create a complete locale object by extending defaults so you don't get undefined errors.
let ret = Utils.extend(en, selectedLocale)
// store these locale options in global var for ease access
this.w.globals.locale = ret.options
} else {
throw new Error(
'Wrong locale name provided. Please make sure you set the correct locale name in options'
)
}
}
}