def process_name_strings(language_data, df):
    """
    Returns a dictionary of names for each of the different items specified in the DataFrame (df).
    The key denotes the row_number of each item. A nested dictionary is the value, with each language code as the key, and the value the name.
    If a language does not have a name/translation, None is provided in its place.
    The default language (typically EN) is specified as 'default'. This should be used as a fallback.
    """
    return_object = {}
    included_languages = []

    def map_to_dict(return_object, language_code, string_dict):
        """
        Nested function that takes data from the DataFrame and puts it into the return_object.
        """
        for row_number, name in string_dict.items():
            if row_number not in return_object.keys():
                return_object[row_number] = {}
            
            name = name.strip()

            if name == '':
                return_object[row_number][language_code] = None
            else:
                return_object[row_number][language_code] = name
    
    # Iterate over each of the columns, extracting the "name " fields.
    # Determines what languages we have available in the DataFrame.
    for column in df.columns:
        if column.startswith('name'):
            included_languages.append(column.lower().split()[-1])
    
    # Build up the dictionary to return.
    for language_code in language_data:
        try:
            string_name = df[f'name {language_code}']
            map_to_dict(return_object, language_code, string_name.to_dict())

            if language_data[language_code]['DEFAULT']:
                map_to_dict(return_object, 'default', string_name.to_dict())
        except KeyError:
            continue
    
    # Fill in the blanks - check each language we should be providing support for is mentioned.
    # If not, specify None in its place.
    for row_number in return_object.keys():
        for language_code in language_data:
            if language_code not in return_object[row_number].keys():
                return_object[row_number][language_code] = None
    
    return return_object