How to translate the search box



I cant find a way to translate the search box in Mitius Theme.


Hi ElDourado7,

Placeholder text of the search box is added by JavaScript. There are two approaches to translate the text:
Approach 1: This approach is recommended because it follows the Drupal translation mechanism, but it is a little bit complicated.
* Prepare your own PO file or download one from Drupal translations page and add following pair values:

msgid "Enter your keywords..."
msgstr "...[Your translation]..."

* Go to Configuration > Regional and language > Translation Interface > "Import" tab
* Select your PO file and the language you want to import to
* Click "Import" button to start import your translation
* Open the file sites/all/themes/tb_mitius/js/tb_mitius.js
* Replace the 41st line with following code:

placeHolderText: Drupal.t('Enter your keywords...')

* Clear your Drupal site cache

Note: Must clear your Drupal site cache whenever you modify the placeholder text or its translation

Approach 2: You could replace the placeholder text with the text of your target language. However, this approach is fine for the site with one language only. If you want to support a multilingual sites, you must follow the first approach.

Kind regards,