def get_locales_from_config():
 locales_offered = config.get('ckan.locales_offered', '').split()
 filtered_out = config.get('ckan.locales_filtered_out', '').split()
 locale_default = [config.get('ckan.locale_default', 'en')]
 locale_order = config.get('ckan.locale_order', '').split()
 known_locales = get_locales()
 all_locales = (((set(known_locales) | set(locales_offered)) | set(locale_order)) | set(locale_default))
 all_locales -= set(filtered_out)
 return all_locales

def get_locales_from_config ( ) : locales_offered = config . get ( 'ckan.locales_offered' , '' ) . split ( ) filtered_out = config . get ( 'ckan.locales_filtered_out' , '' ) . split ( ) locale_default = [ config . get ( 'ckan.locale_default' , 'en' ) ] locale_order = config . get ( 'ckan.locale_order' , '' ) . split ( ) known_locales = get_locales ( ) all_locales = ( ( ( set ( known_locales ) | set ( locales_offered ) ) | set ( locale_order ) ) | set ( locale_default ) ) all_locales -= set ( filtered_out ) return all_locales
despite the name of this function it gets the locales defined by the config and also the locals available subject to the config .