简体   繁体   中英

How do I change the language in jquery mobile?

We use the list filter in jquery mobile:

<ul data-role="listview" data-filter="true">
...

So, this creates an input field with the following placeholder text in it "Filter items...": 在此处输入图片说明

Where or how can I change the language/text of this field?

I looked in the global configuration , but did not find any clue...

Try this on document ready

$("input[placeholder='Filter items...']").attr("placeholder", "Search...");

This will just find all inputs elements with "Filter items..." & will Replace that text with "Search...".

This worked, just adding an extra attribut (which can be translated with php):

<...data-filter-placeholder="Some string"...>

Answered originally by Pavlo as a comment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM