Skip to content

Localization for search plugin #80

Closed
@liulex

Description

@liulex

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' : '搜索...'}
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions