0

I'm wondering that Drupal t() strings are not available for the translation.

Let me explain what I did. I'm going to make my site as multilingual (English & Dutch). English is my source language.

For this, I have added locale module and enabled English and Dutch language.

Then I installed Entity Translation && i18n module on my site.

And then I wanted to show some multilingual text in the user profile edit form. Hence I put form alter and given some string inside t('My topics').

Then I went to /admin/config/regional/translate/translate this page to add a translation for my custom string "My topics". But it not available there.

Where did I'm going wrong?

I'm using - Drupal 7.54 - Enabled Drupal's core locale module - Entity Translation(7.x-1.0-beta6) - Internalization (7.x-1.17)

1 Answer 1

0

I have found the solution.

Initially, my site is in English(source language).

We have to switch the language to other languages on the site(in my case it is Dutch) using this path admin/config/regional/language. Then, we have to view the page which is consists of t(). Then only the t() strings would register for translation.

Now go to admin/config/regional/translate/translate and search your t() string, it will be available and add translation !!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.