import json


def loader(filename):
    """
    Load translation from file and return a dictionary with info.
    
    :param filename: filename info 
    :type filename: str
    
    :return: dict object.
    :rtype: dict

    :raises: TypeError, ValueError
    """
    if not isinstance(filename, str):
        raise TypeError("Expected basestring, got '%s' instead" % type(filename))
    if filename == "":
        raise ValueError("Empty filename got.")

    return json.load(open(filename, "rU"))