#NEWLINE# def get_langinfo( ns ) : #NEWLINE# #INDENT# '\n    Prints tabular data of language and time zone info.\n    ' #NEWLINE# tf = TableFormatter ( stdout , 0 , True , { #NEWLINE# #INDENT# 0 : FIRST_COLUMN_MIN_SIZE , #NEWLINE# #UNINDENT# } ) #NEWLINE# try : #NEWLINE# #INDENT# locale = get_single_instance ( ns , 'LMI_Locale' ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# result = [ ( get_colored_string ( 'error:' , RED_COLOR ) , 'Missing class LMI_Locale. Is openlmi-locale package installed on the server?' ) ] #NEWLINE# tf . produce_output ( result ) #NEWLINE# return [ ] #NEWLINE# #UNINDENT# tf . produce_output ( [ ( 'Language:' , locale . Lang ) ] ) #NEWLINE# try : #NEWLINE# #INDENT# tf . produce_output ( [ ( 'Time Zone:' , ( '%s (NTP is %s)' % ( locale . Timezone , ( 'on' if locale . NTP else 'off' ) ) ) ) ] ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return [ ]