Gayan Virajith Posted April 8, 2014 Share Posted April 8, 2014 Hi community, I am trying to create small module with one configurable input field. I would like to know whether configurable input field supports multi-language feature. I tried following way but no luck. public static function getModuleConfigInputfields(array $data) { $inputfields = new InputfieldWrapper(); // ask static banner content $field = wire('modules')->get('InputfieldTinyMCE'); $field->set('type', wire('modules')->get('FieldtypeTextLanguage')); $field->name = 'bannerBody'; $field->label = "Banner content"; $field->description = ""; if(isset($data['bannerBody'])) $field->value = $data['bannerBody']; $inputfields->add($field); return $inputfields; } Please advise. Thanks ProcessWire & friendly community. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted April 8, 2014 Share Posted April 8, 2014 (edited) Is the mbstring extension for PHP loaded ? // If this function tells something like: Unknown function 'mb_strlen' // Then multibyte support is not funtioning/enabled <?php mb_strlen("test"); ?> Why the hell they have invented tabs in browsers ? This answer belongs in an other tab and in an other other topic (dumb me) Edited April 8, 2014 by Martijn Geerts 1 Link to comment Share on other sites More sharing options...
Gayan Virajith Posted April 8, 2014 Author Share Posted April 8, 2014 @Martijn - thanks for quick response. mbstring is already been installed php-mbstring.i686 (5.4.15-1.fc18) <?php echo mb_internal_encoding(); ?> will output `UTF-8`; Thanks again Martijn. Link to comment Share on other sites More sharing options...
Soma Posted April 8, 2014 Share Posted April 8, 2014 This has come up already... Module config doesn't work with language fields. Since its stored as json and you are actually using inputfields here not fields. Look at LanguageSupportPageNames how it can be done. Apart from that your code would be wrong. It's InputfieldTextareaLanguage with inputfield type InputfieldTinyMCE. 1 Link to comment Share on other sites More sharing options...
Gayan Virajith Posted April 9, 2014 Author Share Posted April 9, 2014 Hi Soma, Thank you for your advise. I will look into LanguageSupportPageNames. Thanks again ProcessWire community. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now