File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 22// Functions for internationalization
33// I18N support information here
44
5- putenv ("LANGUAGE= " .$ _SESSION [ ' language ' ] );
5+ putenv ("LANGUAGE= " .detect_user_language () );
66setlocale ( LC_ALL , 'C.UTF-8 ' );
77
88$ domain = 'hestiacp ' ;
1616 * @param string Fallback language (default: 'en')
1717 * @return string Language code (such as 'en' and 'ja')
1818 */
19- function detect_user_language ($ fallback ='en ' ) {
20-
19+ function detect_user_language () {
20+ if (!empty ($ _SESSION ['language ' ])) {
21+ return $ _SESSION ['language ' ];
22+ }elseif (!empty ($ _SESSION ['LANGUAGE ' ])){
23+ return $ _SESSION ['LANGUAGE ' ];
24+ }else {
25+ return 'en ' ;
26+ }
2127}
2228
2329/**
Original file line number Diff line number Diff line change 7575 < div class ="l-unit-toolbar__col l-unit-toolbar__col--right noselect ">
7676 < div class ="actions-panel clearfix ">
7777 < div class ="actions-panel__col actions-panel__list shortcut-enter " key-action ="href ">
78- < a href ="/schedule/restore/?backup=<?=$backup?>&type=web&object=<?=$key?>&token=<?=$_SESSION['token']?> " title ="<?php print __ ('Restore');?> ">
78+ < a href ="/schedule/restore/?backup=<?=$backup?>&type=web&object=<?=$key?>&token=<?=$_SESSION['token']?> " title ="<?php print _ ('Restore');?> ">
7979 < i class ="fas fa-undo status-icon green status-icon dim "> </ i >
8080 </ a >
8181 </ div >
You can’t perform that action at this time.
0 commit comments