Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Orbit nav button text can't be changed #252

Closed
ctorgalson opened this Issue · 1 comment

2 participants

@ctorgalson

In Orbit 1.3.0, there's no way to alter the "Left" and "Right" text used to manually move from one slide to the next. This is minor issue when localizing a site using Orbit into a non-English language. In e.g. Drupal, you'd usually insert translatable text in Javascript like this:

var translatableElement = '<div>' + Drupal.t('Translatable Text') + '</div>';

The easiest way to do this in Orbit is to move the variable "directionalNavHTML" into the "defaults" object, and changing all calls for "this.directionalNavHTML" to "this.options.directionalNavHTML". This has the slight disadvantage that anyone implementing Orbit who changes the setting may break the nav (e.g. by assigning classes other than 'left' or 'right').

On the other hand, it would be possible to provide overridable defaults just for the actual text 'Left' and 'Right', but since the directional nav markup is provided before the options object is merged with the defaults object, it would necessitate rearranging a bunch of code.

Note: according to Github, I should be able to attach the patch, but I can't. Presumably I don't have permissions to do so. You can download the patch from Dropbox.

@mkelly12 mkelly12 was assigned
@mkelly12
Owner

Fixed in master.

@mkelly12 mkelly12 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.