Skip to content

Documentation for importing languages #252

Open
@tacman

Description

I'm trying to render in Spanish, and am not sure how to configure timeago.

import { register, format, render, cancel } from 'timeago.js';
import {esLocal} from 'timeago.js/lib/lang/es';
register('es', esLocal);

                    const nodes = document.querySelectorAll('.timeago');
                    // use render method to render nodes in real time
                    render(nodes, 'es');

I imagine I'm not registering it correctly, but I can't find the documentation on how to do that. Thanks.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions