def timeago_template(locale, index, ago_in):
    '''
    simple locale implement
    '''
    try:
        LOCALE = __import__('timeago.locales.' + locale)
        LOCALE = locale_module(LOCALE, locale)
    except:
        locale = setting.DEFAULT_LOCALE
        LOCALE = __import__('timeago.locales.' + locale)
        LOCALE = locale_module(LOCALE, locale)

    if isinstance(LOCALE, list):
        return LOCALE[index][ago_in]
    else:
        return LOCALE(index, ago_in)
def timeago_template ( locale , index , ago_in ) : try : LOCALE = __import__ ( 'timeago.locales.' + locale ) LOCALE = locale_module ( LOCALE , locale ) except : locale = setting . DEFAULT_LOCALE LOCALE = __import__ ( 'timeago.locales.' + locale ) LOCALE = locale_module ( LOCALE , locale ) if isinstance ( LOCALE , list ) : return LOCALE [ index ] [ ago_in ] else : return LOCALE ( index , ago_in )
simple locale implement