'Create a `Locale` instance for the given locale identifier.
>>> l = Locale.parse(\'de-DE\', sep=\'-\')
>>> l.display_name
u\'Deutsch (Deutschland)\'
If the `identifier` parameter is not a string, but actually a `Locale`
object, that object is returned:
>>> Locale.parse(l)
<Locale "de_DE">
:param identifier: the locale identifier string
:param sep: optional component separator
:return: a corresponding `Locale` instance
:rtype: `Locale`
:raise `ValueError`: if the string does not appear to be a valid locale
identifier
:raise `UnknownLocaleError`: if no locale data is available for the
requested locale
:see: `parse_locale`'

def parse(cls, identifier, sep='_'):

    if isinstance(identifier, basestring):
        return cls(*parse_locale(identifier, sep=sep))
    return identifier
