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

Localization for search plugin #80

Closed
liulex opened this issue Feb 16, 2017 · 0 comments
Closed

Localization for search plugin #80

liulex opened this issue Feb 16, 2017 · 0 comments

Comments

@liulex
Copy link
Contributor

liulex commented Feb 16, 2017

At the moment, we can only specify one placeholder for the search plugin, like "Type to search". However, when the user is on a Chinese page, it would be more friendly to use a translated placeholder, like "搜索...“.

I think we can bind the placeholder to the path, just like the sidebar. For example, we can support the following syntax:

window.$docsify = {
    search: {
      placeholder: {'/' : 'Type to search', '/zh-cn' : '搜索...'}
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants