We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Localizing checkbox labels in the publish page

Development and Programming

Adrian Macneil (Crescendo)'s avatar
Adrian Macneil (Crescendo)
28 posts
15 years ago
Adrian Macneil (Crescendo)'s avatar Adrian Macneil (Crescendo)

Ok, maybe the title didn’t explain it very well!

Basically, I’m developing a module which adds a tab to the publish page. With fields I add to the publish page, like a textbox, I can localize the title like so:

array('field_id' => 'my_textbox',
    'field_label' => lang('textbox_name'),
    'field_type' => 'text',
    'field_data' => 'text data',
    'field_required' => 'n',
    'field_instructions' => lang('textbox_instruction'),
    'field_text_direction' => 'ltr',
    'field_maxl' => '10')

With a checkbox, I am forced to make this bizarre thing called a checkbox group. But I cannot for the life of me localize the name of the individual checkboxes!

array('field_id' => 'my_checkbox_group',
    'field_label' => lang('checkbox_group_title'),
    'field_required' => 'n',
    'field_type' => 'checkboxes',
    'field_data' => array(),
    'field_list_items' => array('individual_checkbox_id'), // <= how on earth do I set the text label of this checkbox?????
    'field_instructions' => '',
    'field_pre_populate' => 'n',
    'field_pre_field_id' => '',
    'field_pre_channel_id' => '',
    'field_text_direction' => 'ltr')

Hopefully that makes sense? I want to localize the name of the individual checkbox. Any ideas?

       
Adrian Macneil (Crescendo)'s avatar
Adrian Macneil (Crescendo)
28 posts
15 years ago
Adrian Macneil (Crescendo)'s avatar Adrian Macneil (Crescendo)

Well if anyone comes across this post in future, I gave up and used a dropdown. Not the ideal solution, but I spend quite a bit of time trying to work this one out!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.