Skip to content

Conversation

Danielku15
Copy link
Contributor

I added localization support for the zoom control. There was a pull request for this before: #1643 But the implementation was quite strange with language overriding.

This implementation uses the control options to localize the strings. I also thought of another solution with:

options: {
    buttons: {
        zoomIn: {
            title: 'Zoom in',
            text: '+'
        },
        zoomOut: {
            title: 'Zoom out',
            text: '-'
        }
    }
}

Let me know what you'd prefer and I will implement it.

@mourner
Copy link
Member

mourner commented Aug 27, 2013

Sorry for a later reply, just got back from vacation. Thanks for the pull!
Is there a specific need to localize the +/-? They seem language-independent.

@Danielku15
Copy link
Contributor Author

I made the +/- localizable to allow people the use of custom unicode symbols as zoom indicators. Or if you want to use a custom web-font you can override the characters used for the zoom buttons.

@mourner
Copy link
Member

mourner commented Sep 1, 2013

OK, makes sense! Can you rename zoomIn/OutTooltip to zoomIn/OutTitle for better naming consistency? I'll merge then.

mourner added a commit that referenced this pull request Sep 9, 2013
Localization Support for Zoom Control
@mourner mourner merged commit 96575af into Leaflet:master Sep 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants