I’m a little stumped here. I’m trying to customize the “category” language with an extension. Often I use categories in a very specific way - in this example, each category is a music genre.
I figured it would be easy. I used the show_full_control_panel_start hook, and did this as a test:
global $LANG;
$LANG->language['categories'] = "genres";Nope, didn’t work. I double-checked the categories tab in the source, and its label is sure enough generated by $LANG->line(‘categories’); So I did this in the same hook:
print_r($LANG->language)And lo and behold, the variable was changed as I wanted:
['categories'] => 'genres'But still no joy on the changes actually being reflected in the publish form. So I added another method on the show_full_control_panel_end hook, to see if my changes stayed in effect after the page was built:
echo $LANG->line('categories');Surprisingly, my change was still there.
So, how could I be setting this language variable at show_full_control_panel_start, and successfully echoing it at show_full_control_panel_end, but have it not be affecting the output of that variable in-between the two hooks?
Any ideas? I thought maybe there was some JavaScript at play manipulating the output, so I disabled JS as well, but to no avail.
Haha, wow, you learn something new every day. I have never looked at that Utility before, nor was I familiar with the /translations/ directory. Thanks for pointing me there.
However, even this appears to have no effect on the language used on the publish page. Which makes me think that this is actually a bug of some kind.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.