In my module I have some custom strings. I use these in the t()
function.
When I go to admin/config/regional/translate/translate
and filter the untranslated strings my custom strings do not show here.
What could be going wrong?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityIn my module I have some custom strings. I use these in the t()
function.
When I go to admin/config/regional/translate/translate
and filter the untranslated strings my custom strings do not show here.
What could be going wrong?
The strings needs to be rendered a first time on a page in the not default language and your string keys will be visible in the Translate interface
.
An important detail, the search is case sensitive. For example My text
is different than my text
.
If you're trying to see the site in English the t()
function will not try translate the string, so you need to see the site in other language in order to for the translation system to add your translatable string to the database.
Once you do it, you will be able to translate your string.
Beside visiting the page showing your strings in a non-default language, make sure to have the version number of the module set in the .info file.
version = 7.x-1.0
Here a trouble shooting blog post to getting your strings into the translate interface.