Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By defining your settings/variables to the Variable API they become translatable. The file attached does this for the more link URI and text, but maybe some other settings might be translatable as well.
Just add this file to your module directory and that's it. No need to include it from your .module, nor define it in your .info. No performance penalty, no warnings when the variable module is not installed, simple and non-intrusive.
Note that this issue is complementary to #2476801: Ensure all strings are translatable that handles hard coded strings in your module's code.
Comment | File | Size | Author |
---|---|---|---|
#5 | instagram_social_feed.variable.inc_.txt | 714 bytes | fietserwin |
#2 | instagram_social_feed.variable.inc_.txt | 717 bytes | fietserwin |
Comments
Comment #2
fietserwinComment #3
fietserwinI had to change the extension before i could upload it. Rename the attached file to instagram_social_feed.variable.inc.
Comment #4
DamienMcKennaA minor nitpick, but there shouldn't be a t() call on an empty string.
Comment #5
fietserwinYou are right. Copy, paste, no(t enough) edit.
Comment #7
dysproseum CreditAttribution: dysproseum commentedCommitted patch.