Windows: Fix language detection
This commit is contained in:
		
							parent
							
								
									72be14a04d
								
							
						
					
					
						commit
						a9994b791b
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -155,6 +155,10 @@ except locale.Error as error: | ||||||
| 
 | 
 | ||||||
| try: | try: | ||||||
|     LANG = get_default_lang() |     LANG = get_default_lang() | ||||||
|  |     if os.name == 'nt': | ||||||
|  |         # Set the env var on Windows because gettext.find() uses it to | ||||||
|  |         # find the translation | ||||||
|  |         os.environ['LANG'] = LANG | ||||||
|     print('Found default language: %s' % LANG) |     print('Found default language: %s' % LANG) | ||||||
| except Exception as error: | except Exception as error: | ||||||
|     print('Failed to determine default language') |     print('Failed to determine default language') | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue