The following code does what you seem to need (screenshots attached). The following modules need to be activated:
- i18n_menu (part of the i18n)
Further configuration:
- I added a new language (tr) and set language detection to "Determine the language from the URL (Path prefix or domain)."
- I added a new menu with machine name (menu-sol-menu) and set the translation mode to "Translate and Localize". Also added the new menu as a block to the header region of the theme.
Added the following code in a custom module and activated it.
function agi_menu() {
$items = [];
$items['agi'] = [
'title' => 'AGI (Family Status Declaration)',
'page callback' => 'drupal_get_form',
'page arguments' => ['node_form'],
'access arguments' => ['access content'],
'menu_name' => 'menu-sol-menu'
];
return $items;
}
I visited the menu admin page and saw that a new menu item was added:
I checked the language option for that new menu item, it was set to neutral.
I visited the home page of my drupal instance and checked that the menu item appears, for both english (default language) and turkish, using the URL to define the current language.
Finally, I looked in the translate interface for the title of the menu item.
Conclusion: The provided code with the described configuration works as expected by the OP.
Good luck!
N.B.: Especially for the 'title' and 'title callback' properties, the documentation is very clear about how to use them in a multilingual setting
"title": Required. The untranslated title of the menu item. "title
callback": Function to generate the title; defaults to t(). If you
require only the raw string to be output, set this to FALSE.
Translate and Localize. Menu items with language will allow translations. Menu items without language will be localized.
is checked.