Skip to content
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

Fullscreen translation #22

Open
electroheadfx opened this issue Sep 3, 2018 · 1 comment
Open

Fullscreen translation #22

electroheadfx opened this issue Sep 3, 2018 · 1 comment

Comments

@electroheadfx
Copy link

I can change the translation at flickity creation ? e.g. Fullscreen = "Plein écran" in french. Thanks

@desandro
Copy link
Member

You can set custom fullscreen button title with JS. See demo https://codepen.io/desandro/pen/rZJKXb

// external js: flickity.pkgd.js, fullscreen.js

var flkty = new Flickity( '.carousel', {
  fullscreen: true,
});

var viewFullElement = flkty.viewFullscreenButton.element;
var exitFullElement = flkty.exitFullscreenButton.element;

var viewTitle = 'LET ME SEE FULLSCREEN';
var exitTitle = 'EXIT THIS FULLSCREEN';
viewFullElement.title = viewTitle;
exitFullElement.title = exitTitle;
viewFullElement.setAttribute( 'aria-label', viewTitle );
exitFullElement.setAttribute( 'aria-label', exitTitle );

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

No branches or pull requests

2 participants