"Create account" and "My account" in the user menu are not translatable. "Log in" and "Log off" on the other hand can be translated.

Others seem to have the same problem:
http://www.drupalcommerce.org/discussions/4258/translation-not-possible-...

Comments

candelas’s picture

Version:7.x-2.0-rc4» 7.x-2.1

same here.

what i also noticed is that i have 2 user menus and also 2 blocks. i think they may interference one each other.
in the menu that kickstart uses admin/structure/menu/manage/menu-user-menu, there are these items:

  • Log in
  • Create account
  • My account (disabled)
  • Enable My account menu link
  • Log out

in the other admin/structure/menu/manage/user-menu i get this items:

    My account (enabled)
  • Log out

one strange thing is that, in menu-user-menu, if i enable the menu item 'My account', it gets disabled when saved. if i change the 'My account''s parent menu from 'user-menu' to 'menu-user-menu' i cant enable it either.
so i leave everything as it was.

then i made both menus translatable: in admin/structure/menu/manage/menu-user-menu/edit choosing the option: Translate and Localize. Menu items with language will allow translations. Menu items without language will be localized.
then i went to translate the "My Account". i edit the menu link and i get a tab with translate. after rebuilding menus and clearing caches, it did work :)

then i wanted to make the same with the other menu item that doesnt get translated 'Create account'. but when i go to edit the item i dont get the tab to translate, nor i found the string when i go to admin/config/regional/translate/translate and search.
so i disabled that menu item and then i created and translated a copy of it. now i get it translated :)

other interesting thing, i believe, it is that the l10n_client module that many people uses to translate the interface doesnt find the menu items (nor yours or the ones i create in the menu-user-menu). i think because the weight of this module and the one you use to create this menu. it would be nice to be able to use it, since you can translate and collaborate at the same time with localize.drupal.org sending the translations at the same time that you make them.

i hope this helps to resolve this bug.

by the way, the upgrade from 2.0 to 2.1 went perfect.
congratulations for the good work :)

alpp’s picture

"My account" also became translatable after changing the menu item title & refreshing (both) a few times.

alpp’s picture

in addition: i've had difficulties in translating "All products" page name in breadcrumbs.

it kept staying as it is on page "projects" (cleared cache etc. but nothing changed) so i had to add another menu item calling "products?search_api_views_fulltext=" so that the breadcrumb shows the translated version, and the page looks pretty much the same...

alpp’s picture

One more thing that can't be translated is: in the search views' price section "From XX€", this "From" is nowhere to be found to get translated...

candelas’s picture

@alpp were you able to translate the vocabulary name in search block on the all products page?
i can translate the terms but not the name of the vocabulary...
i have search in internet, but i was unable to find a solution at the moment...

edit: i was able to translate the name by translating the block name.

candelas’s picture

to translate field labels (on fields that are not translatable) use the Internationalization admin/config/regional/translate/translate
the same to field descriptions :)

candelas’s picture

@alpp i tried to make what you say but it didn't work for me and, after looking views and all around, i decide to solve it with jquery (a .js in my theme). i put here just in case other person needs it. I change "All products" by "Gama" (spanish translation) if the page body has the class "page-products" and "i18n-es".

  
$(document).ready(function() {
  
   if($('body').hasClass("page-products") && $('body').hasClass("i18n-es")){
        text=$("div#breadcrumb div.breadcrumb").html().replace("All products", "Gama");
        $("div#breadcrumb div.breadcrumb").html(text);   
   }
  
});
candelas’s picture

Version:7.x-2.1» 7.x-2.2

the above solution became not valid when i realized that this was general for menu items that i created.
the module crumbs is used in kickstart and i saw that i had in 7.x-2.2 the version 1.8 and that they released version 1.9 where they say "Better support for menus in multiple languages". then i saw than in the actual kickstart dev, they put the new version. so i took it from there and now everything works with crumbs multilingual :)

studilio’s picture

[FRANCE]
Hello,
Bonjour, vous êtes ESPAGNOL, FRANCAIS ?
Nous devons être de nombreux français à vouloir utiliser Drupal KickStart.
A defaut de disposer d'un forum Français ou autre, Je propose de commencer tous les messages postés par des Français par [FRANCE] ou par des Espagnol par [ESPAGNE] et ainsi de suite, même si nous les écrivons en anglais.

Ainsi si l'un d'entre nous à une réponse nous pourrons nous aider directement dans notre langue.
De plus, de nombreux problèmes peuvent être liés à la localisation / traduction / paiement / Livraison.
Good day everybody.
Jeff

candelas’s picture

@studilio je ne suis pas francais, me je ame votre pais et je comprand la langue :)
merci pur votre invitacion

leanderl’s picture

Hope this is the right place to post this. I just had to add t('All Products) to row 112 of commerce_kickstart_search.module. Hopefully the info finds its way to the right person. Couldn't find the module on drupal.org...

function commerce_kickstart_search_search_api_facetapi_keys_alter(&$keys, $query) {
if ($keys == '[all items]' && !isset($_GET['f'])) {
// All products without facets.
$keys = '';
drupal_set_breadcrumb(array(l(t('Home'), ''), t('All Products')));
}

Haza’s picture

@studilio : No, just no.

jsacksick’s picture

Status:Active» Fixed

Ok there was an issue with the crumbs module, this commit https://code.drupalcommerce.org/#/c/647/ adds a patch to fix the wrong translation of the breadcrumb.
The menu items are translatable with patiences and luck :).
To do that, you'll have to enable i18n_menu, of course an other language. Some of the menu items are translatable directly via admin/config/regional/translate/translate, for instance the "All products" menu item provided by the all products view.
For some other menu items like "To carry" etc + the user menu items, you'll have first to enable the translation for your menu by going to admin/structure/menu/manage/[YOUR_MENU_NAME]/edit and check "Translate and Localize. Menu items with language will allow translations. Menu items without language will be localized. "
Once you will have done those steps, you'll have to save your menu items, then a translate tab will be available to translate your menu links.

leanderl’s picture

Mais si l'on veut faire ce que vous proposez, il y aura beaucoup de gens qui ne comprennent pas. Et par conséquent, les personnes ayant des problèmes similaires avec traductions ne peuvent pas bénéficier de la disussion, par exemple pour la traduction hongrois, suédois, finnois, allemand, swahili ....

sja1’s picture

comment 13 worked for me, but I need one additional step to translate "Create account". After navigating to admin/structure/menu/manage/menu-user-menu/edit and enabling translation for the menu by selecting "Translate and Localize" radio button (then saving), I then went to admin/structure/menu/manage/menu-user-menu, and clicked the "edit" link for the "Create account" menu item (which takes you to admin/structure/menu/item/710/edit). The problem for me was that once there, no "translate" tab appeared. After much head scratching, I realized that the "Language" field for the menu item was sent to "Language neutral." After changing it from language netral to (in my case) Spanish, and then saving, the "translate" tab finally appeared.

Hope this helps somebody!

x1d’s picture

I have the same problem finding and translating or "removing" this "From $"
Its a pity I was able to translate almost everything beside Taxonomy menu and this "From"...

x1d’s picture

Found my own solution for my "From" problem (not translatable)

went to

admin/commerce/config/product-variation-types/product/display/node_product_list

and removed the "From" prefix

Status:Fixed» Closed (fixed)

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

dotoree’s picture

I had the same problem, translating 'My account' string with a multilingual site (English/Greek). Here is how i fixed:

1) Added this code to template.php

<?php
/**
 * Implements hook_translated_menu_link_alter().
 */
function MYTHEME_translated_menu_link_alter(&$link) {
 
// Hide the "User account" link for anonymous users.
 
if ($link['link_path'] == 'user' && !$GLOBALS['user']->uid) {
   
$link['hidden'] = 1;
  }
}
?>

2. Set User menu to => Translate and Localize. Menu items with language will allow translations. Menu items without language will be localized.
3. Changed 'My account' initial string in User menu to the Greek counterpart (Ο λογαριασμός μου), set language to Greek.
4. Added a new item 'My account' with path 'user' and set language to English.
5. Done!

igi’s picture

Version:7.x-2.2» 7.x-2.9

Translate "Create account"
1. Go to /admin/config/regional/translate/translate and translate string "Create account"
2. Open database with phpmyadmin for examlpe and execute:
update menu_router set title='Create account' where path='user/register'
3. Go to /admin/config/development/performance and clear cache.

Done.

igi’s picture

"Create account"
1. Go to /admin/structure/menu/manage/menu-user-menu
2. Edit "Create account" link and change title from "Create account" to "Create new account"
3. Done.

"My account"
1. Go to /admin/structure/menu/manage/menu-user-menu
2. Edit "My account" link and change title from "My account" to "User account"
3. Done.

artbussy’s picture

Issue summary:View changes

#21 works. Mind: edit in both menu's, even the disabled link My account.

hosais’s picture

Hi,

I think all these discussion make all these items can be translated. Thanks.

But I have an issue. Druapl has options to negociate the web. When browser's language applied, for example, in my case it change to Spanish (with http://example.com). However, all the link is with /en/user/register, /en/user/logout. That is, it is spanish text (with English link). All the page is in Spanish, when user click it, it go to the English web page.

So MENU the like is user/register -> en/user/register when the page is Spanish. I think it is not the behavior as designed.

The only way to force it use menu translation and give a put complete URL (like http:/example.com/es/user/register). My problem right now is kickstart commerce since hide user/register by "user/register" inner link. If I change to "http:// ..." the CREATE ACCOUNT will appear when the user logged in.

Anyone has suggestion?

Thanks.