File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed
Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -228,27 +228,7 @@ public function findGenericLanguage(?string $appId = null): string {
228228 return $ defaultLanguage ;
229229 }
230230
231- // Step 3.1: Check if Nextcloud is already installed before we try to access user info
232- if (!$ this ->config ->getSystemValueBool ('installed ' , false )) {
233- return 'en ' ;
234- }
235- // Step 3.2: Check the current user (if any) for their preferred language
236- $ user = $ this ->userSession ->getUser ();
237- if ($ user !== null ) {
238- $ userLang = $ this ->config ->getUserValue ($ user ->getUID (), 'core ' , 'lang ' , null );
239- if ($ userLang !== null ) {
240- return $ userLang ;
241- }
242- }
243-
244- // Step 4: Check the request headers
245- try {
246- return $ this ->getLanguageFromRequest ($ appId );
247- } catch (LanguageNotFoundException $ e ) {
248- // Ignore and continue
249- }
250-
251- // Step 5: fall back to English
231+ // Step 3: fall back to English
252232 return 'en ' ;
253233 }
254234
You can’t perform that action at this time.
0 commit comments