diff --git a/public_html/lang/generate_lang_file.php b/public_html/lang/generate_lang_file.php
index eb4317c4..453abdb6 100755
--- a/public_html/lang/generate_lang_file.php
+++ b/public_html/lang/generate_lang_file.php
@@ -62,7 +62,7 @@ foreach($GLOBALS['LSconfig']['ldap_servers'] as $conf) {
// LSobject
-if (loadDir('../'.LS_OBJECTS_DIR)) {
+if (loadDir('../'.LS_OBJECTS_DIR) && loadDir('../'.LS_LOCAL_DIR.LS_OBJECTS_DIR)) {
foreach($GLOBALS['LSobjects'] as $name => $conf) {
add($conf['label']);