New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Internationalisation #177

Closed
RavanH opened this Issue Jun 20, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@RavanH
Contributor

RavanH commented Jun 20, 2018

A very interesting light weight script like this should be available to everybody around the world. This means: texts like "loading..." and "esc to close" etc. should be translatable. And if possible, language selection should adhere to the document html lang attribute.

Or maybe just an easier way to pass alternative text (or html?) as options? It seems using the template parameter is a bit overkill...

@jsor

This comment has been minimized.

Show comment
Hide comment
@jsor

jsor Jul 7, 2018

Owner

I always felt it is quite easy to do that with the template option. If you have a good idea how to handle that, i'm open for a patch...

Owner

jsor commented Jul 7, 2018

I always felt it is quite easy to do that with the template option. If you have a good idea how to handle that, i'm open for a patch...

@marcelogarbin

This comment has been minimized.

Show comment
Hide comment
@marcelogarbin

marcelogarbin Aug 7, 2018

How can I translate if I am calling the files directly from node_modules?

marcelogarbin commented Aug 7, 2018

How can I translate if I am calling the files directly from node_modules?

@RavanH

This comment has been minimized.

Show comment
Hide comment
@RavanH

RavanH Aug 7, 2018

Contributor

@marcelogarbin like @jsor said, currently there is only the template option. For example, I'm doing this
to set a global template with French texts:
jQuery(function(){ lity.options( 'template', '<div class="lity" role="dialog" aria-label="Fenêtre de dialogue (Appuyez Échap pour fermer)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Chargement...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Fermer (Appuyez Échap pour fermer)" data-lity-close>&times;</button></div></div></div>' ); };

Contributor

RavanH commented Aug 7, 2018

@marcelogarbin like @jsor said, currently there is only the template option. For example, I'm doing this
to set a global template with French texts:
jQuery(function(){ lity.options( 'template', '<div class="lity" role="dialog" aria-label="Fenêtre de dialogue (Appuyez Échap pour fermer)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Chargement...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Fermer (Appuyez Échap pour fermer)" data-lity-close>&times;</button></div></div></div>' ); };

@marcelogarbin

This comment has been minimized.

Show comment
Hide comment
@marcelogarbin

marcelogarbin commented Aug 7, 2018

Thank's @RavanH

@jsor jsor closed this Sep 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment