loader.tcl 871 B

1234567891011121314151617181920212223
  1. ################################################################################
  2. #
  3. #EN : This is the file that loads the language for the script
  4. #
  5. #RO :Acesta este fisierul ce incarca limbajul pentru BlacKTools
  6. #
  7. ################################################################################
  8. set get_lang_files [glob -directory "$black(dirname)/BlackTools/lang" "*lang.tcl*"]
  9. foreach lang $get_lang_files {
  10. set black(lang_error_$lang) [catch {source $lang} black(lang_error_stats_$lang)]
  11. if {$black(lang_error_$lang) == "1"} {
  12. putlog "\[BlackTools\] :Couldn't load the lang file \"$lang\".Reason: \"$black(lang_error_stats_$lang)\""
  13. } else {
  14. set split_lang [split $lang "."]
  15. set the_lang [lindex $split_lang 1]
  16. lappend black(current_lang) [join $the_lang ","]
  17. }
  18. if {![info exists black(current_lang) ]} {set black(current_lang) "NONE"}
  19. }