when switching default language choice from english to arabic

menus that were translated into arabic before , appear as not translated

when i switch back

it appears okay

also some menus (created in views) does not appear at all in the translate table

thanks

Comments

pasqualle’s picture

Title: switching default language » menu item created by views is not translatable
Project: Translation table » Internationalization
Version: 6.x-1.0-beta1 » 6.x-1.0
Component: Code » Experimental modules

first problem (changing the default language) This works as it should be. If you change the default language you will lose all dynamic translations (made by i18nstrings module)..
quote from http://drupal.org/node/313293

You must decide on the site default language before using this feature. Changing it later will garble all your user defined strings translations.

second problem: not translatable menu items (created by views). Probably the i18nmenu module does not save that string into the locales_source table. That could be a bug or feature request..

either way this issue is not related to the Translation table module, moving to the right queue..

abqaria’s picture

so after changing the default language i should go to the translate table and make save again ?

about the views menus, does this mean i should create menus manually better , to be able to translate them

abqaria’s picture

okay i am very sorry

i should have read this before posting here

abqaria’s picture

i did switch the default language

now they appear okay in the translate table

i tried to reedit them but they do not change

should i delete them through php admin

or uninstall and reinstall

pasqualle’s picture

1. You should choose the default language and do not change it any more.
2. Uninstalling the i18nstring module does not delete the source strings and does not delete the translations.
3. As I know if you want to assign a menu item to view, you need to do it inside the views admin interface.

Can you explain clearly what is the problem, and what are you trying to achieve? I do not know what did you try to reedit and why, and what are you trying to delete. You can attach images for easier understanding..

abqaria’s picture

on my site i do have english (default) and arabic language

i did use the translation table (menu translation)

all things went fine..

now i switched the default to arabic

menus are not translated although they appear okay in the translation table (menu translation) tab

many thanks

pasqualle’s picture

the Translation table module only displays the strings from 2 tables, from locales_source (source strings) and locales_target (translations) table. It does not check your default language and it does not check if those strings are used as menu items or not.

You changed the default language, so the menu items are not translated. see #1
The old strings are still in those tables, so the translation table module still displays them. But all those string are only junk now (they are not used for menu translation)..

quote from http://drupal.org/node/313293

Warning: Whenever you change the default language, you'll need to manually recreate all the source strings so they are defined in that language. This means you may need to edit all your menu items, (localizable) taxonomy terms, etc..

You need to translate your menus again, using the new default language as source, Arabic->English. You need to re-save all your menu items one by one, to have source strings. (Go to admin/build/menu, open (every) menu, and click (every) "edit" under "Operations". Hit save.) The message should be displayed, that the menu item text was saved as a source string.
Only then it will be displayed in the translation table module.

To delete unused strings you should go to the admin/build/translate/search page. You need to search for the string and use the delete link.
With translation_table-6.x-1.x-dev (or any official release after today) you can delete the translations with clearing the translation field and save. It is not possible to delete source strings with the Translation table module.

pasqualle’s picture

Title: menu item created by views is not translatable » what to do when you need to change the default language
Category: bug » support

maybe the refresh button on the admin/build/translate/refresh page can add all you missing source strings, but I am not sure..

abqaria’s picture

i tried everything above

nothing makes a new string appears

all my previous translation are still in the translation table

is it possible just to delete the translation table modules tables using myphpadmin

and start all over again

pasqualle’s picture

Translation table module does not have any tables..

I believe this would be the SQL command to delete all menu item source strings and translations:

DELETE FROM {locales_target} WHERE lid in (SELECT lid FROM {locales_source} ls WHERE ls.textgroup = 'menu');
DELETE FROM {locales_source} ls WHERE ls.textgroup = 'menu';
abqaria’s picture

i got this error

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{locales_target} WHERE lid in (SELECT lid FROM {locales_source} ls WHERE ls.text' at line 1

pasqualle’s picture

use the correct table name instead of {locales_target}. {} is used in Drupal to add the table prefix if any..

abqaria’s picture

i am very sorry

what would be the correct table name

i am so sorry , i am not quit aware with sql

pasqualle’s picture

if you did not set table prefix at install then it would be locales_target.
you should not modify your database tables directly if you are not familiar with basic SQL syntax..

pasqualle’s picture

Project: Internationalization » Translation table
Version: 6.x-1.0 » 6.x-1.x-dev
Component: Experimental modules » Code
Status: Active » Fixed

There is a delete link for every string now. you do not need to write SQL queries..
#470548: Add columns with links to edit & delete the string, and view lid

Status: Fixed » Closed (fixed)

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