Dear All,
I am an inexperienced programmer and I just dive into Drupal theming and programming a few days ago.
I cannot figure my way out about finding the right CSS classes to modify in a subtheme I created from commerce_kickstart_theme.
Here is what I want to do.
The language switcher by default posts links via locale_block_view function in modules/locale/locale.module
function locale_block_view($type) {
if (drupal_multilingual()) {
$path = drupal_is_front_page() ? '<front>' : $_GET['q'];
$links = language_negotiation_get_switch_links($type, $path);
if (isset($links->links)) {
drupal_add_css(drupal_get_path('module', 'locale') . '/locale.css');
$class = "language-switcher-{$links->provider}";
$variables = array('links' => $links->links, 'attributes' => array('class' => array($class)));
$block['content'] = theme('links__locale_block', $variables);
$block['subject'] = t('Languages');
return $block;
}
}
}
Since it is told to be dangerous to modify core modules, I had followed the advices from http://drupal.org/node/1369090 and modified my theme/template.php and added the following;
function MYTHEMENAME_links__locale_block(&$vars) {
foreach($vars['links'] as $language => $langInfo) {
$abbr = $langInfo['language']->language;