Hi,

I'm testing drupal 6 since some month now, and I'm afraid to see that the internationalization system that was one of the Drupal 6 credo don't go as far as drupal logic often goes. There is lot of missed translation around here. Most can be made thanks to i18n, but there are 2 major translation needs that don't find solution.

The contact form

I search throught the net, and, by tweaking the setting.php file with a i18n trick, you can translate the contact information textarea. But all others informations (categories, automatic reply, etc...) are simple not translatable ATM. I think it's a serious issue for a website that prone multilanguage feature today.

Roles

Another missing translation is about roles, you can define them only in one translation which is a pain to try to tweak to show an user role in his native language. (the strange thing is that anonymous and authentificated users are translatable), why others roles aren't ?

Conclusion

I imagine that lots of people are a little disappointed by the missing multilanguage stuff in D6, and, if it was possible, some modules already came out to fix that problem, so, if it's not, I imagine it's impossible ATM without hacking the core.

However, I need opinion about how to fix that, if it's possible, and without hacking the core, maybee I can claim this task, and what would be the best way to do this (integrate with i18n ?, provide a patch for the core ?, make a completly new module ?).

Thanks for your future answers,

regards,

zmove

Comments

wuf31’s picture

Yeah.. I'm having this problem as well..
Looks like the drupal 6 internationalization still has some way to go..

Right now, I'm still working on translating menu, taxonomy, views, webform and getting globalredirect to work as intended. Phew! Doing translation is quite some work :P

sirsimor’s picture

I miss the categories box in contact form. I can think of an quick way to fix it, just add a field to the Contact table with language of each category and then filter categories that fit the current language.. but I'll leave it for others to do it.

simon

durum’s picture

zmove how did you translate contact form information? Did it go with i18n?

tia

zmove’s picture

Hi,

You can translate it by defining some $conf informations in the setting.php file.

See this thread for more informations.

durum’s picture

thanks.

ainigma32’s picture

Status: Active » Postponed (maintainer needs more info)

@zmove: did you ever get some feedback from any of the core devs? If not you might have better luck on the developers mailing list or on IRC.

- Arie

ainigma32’s picture

Status: Postponed (maintainer needs more info) » Fixed

Looks like zmove won't be posting any feedback so I'm setting this to fixed.

Feel free to reopen if you think that is wrong.

- Arie

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

mairav’s picture

Status: Closed (fixed) » Active

I'be veen looking everywhere. Are role names traslatable? I have an spanish / english site, and I can't let the role names only in spanish cause that wouldn't be understand by those who speak english.
Did someone find a way to translate the role names?

gpk’s picture

Status: Active » Fixed

@9: you would probably need to use i18n module, see http://drupal.org/node/304002.

For anyone else who comes by here, if that doesn't also fix the contact form translateability then try http://drupal.org/project/tcontact.

mairav’s picture

I already have i18n installed, but the role names are not being translated.

gpk’s picture

Title: Contact form Roles are not translatable ! » Contact form and Roles names are not translatable !
Status: Fixed » Active

Ah yes, I was looking at #18954-28: "anonymous user" and "authenticated user" are not translateable, but http://api.drupal.org/api/function/user_edit_form/6 and http://api.drupal.org/api/function/user_roles/6 appear to give no option for i18n or anything else for that matter to translate role names ...

Have opened issue here #598862: Custom user roles are not translatable in core alone (requires a contributed module) against i18n project, but this may actually be a core bug/"feature".

mairav’s picture

Thanks! I already suscribe for that issue so I can see any progress or anwser on it. I have an spanish site and it doesn't look good if i send an english user "you have been assigned the role pintor" :P
Thanks again for opening the issue.

blueblade’s picture

I have the same problem too. Have you found the solution, mairav?

andypost’s picture

Version: 6.4 » 6.x-dev

suppose this will never fixed

mairav’s picture

@blueblade, I couldn't find a solution yet.
I found this posts where they sent a patch to cvs for drupal 7 (#598862: Custom user roles are not translatable in core alone (requires a contributed module))
But they say nothing about commiting to drupal 6.

The problem is that drupal 7 is not ready yet, but I cant launch a site with untranslated role names... and for what I saw is a problem a lot of us is suffering.

blueblade’s picture

Hi mairav,

Thanks for replying. I guess we just have to leave some text in the original language. How are you dealing with this tho?

BB

sun’s picture

Status: Active » Closed (won't fix)

#10 already contains the right pointers to modules that can solve this issue for D6.

@gpk: You can "won't fix" in such situations, too :)

liquidcms’s picture

after digging around for a bit although i agree with sun that #10 points to i18n as a module that COULD solve the issue of translating roles - as far as i can tell no one has written that module yet. I think it would be a module which uses i18nstrings module - but don't think one has been written yet.

so, for now, D6 has no solution for translating roles - although sounds like it could be done with i18n and therefore not required to hack core

liquidcms’s picture

not quite sure what i was doing and documentation is a bit weak.. but this seems to let me translate roles.

in my custom module (caubo.module):

/**
 * Implementation of hook_locale().
 */
function caubo_locale($op = 'groups', $group = NULL) {
  switch ($op) {
    case 'groups':
      return array('roles' => t('Roles'));
    case 'refresh':    // don't think this is required
      if ($group == 'roles') {
        return caubo_locale_refresh();
      } 
    case 'info':
      $info['roles']['refresh callback'] = 'caubo_locale_refresh';
      $info['roles']['format'] = FALSE;
      return $info;     
  }
}

/**
 * Read all existing legal strings into the local system.
 */
function caubo_locale_refresh() {
  $results = db_query("SELECT * FROM {role}");
  while ($role = db_fetch_object($results)) {
    if ($role->rid == 1) continue;    // don't add Anonymous since it is handled by t() in core
    i18nstrings_update_object("roles:role:" . $role->rid, $role, array('name'));
  }  
  
  return true;
}

and then to use this i have a custom form that lists some of my roles for user to select:

  $display_roles = get_roles();
  foreach($display_roles as $role){
    if ($role) {
      $role_name = db_result(db_query("SELECT name FROM {role} WHERE rid = %d", $role)); 
      $role_name = i18nstrings("roles:role:$role:name", $role_name);
      if (substr($role_name, 0, 2) != $filter) {
        if(in_array($role, $approval_roles)) {
          
          $role_name .= " <i>*" . t("needs administration approval") . "</i>";
        }
        $roles[$role] = $role_name;
      }
    }
  }
jvieille’s picture

Status: Closed (won't fix) » Needs review

Roles can be translated with a very simple patch worked out for D8
http://drupal.org/node/1759810

Applies to D6 without any change

Edit:
This does not work

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.