MIDlet name localization

The standard MIDP 2.0 specification-defined MIDlet JAD manifest attributes only support single MIDlet names with no localized variants. Series 40 and Symbian support the following additional attributes for localized MIDlet names:

  • Nokia-MIDlet-Name-<locale> for localized MIDlet suite names.

  • Nokia-MIDlet-<n>-<locale> for localized MIDlet names.

The current locale of the device is available to the application through the microedition.locale system property. During MIDlet installation, if the installer finds that the MIDlet JAD/manifest contains a locale-specific MIDlet name with same locale as in microedition.locale system property then the MIDlet is installed with that locale-specific name to the system. In Symbian, if the locale of the device does not match with any of the attributes, the most specific part of the locale is removed and matching is tried again. In Series 40, if the locale does not match with the attributes, the normal name is used.

For example, if there is no localized MIDlet name for locale 'es-US', the Java Runtime checks next whether there is localized name for locale 'es'. If no localized name is found, the normal MIDlet name is used.

Note: In Symbian, when the user changes the language and reboots the device, the MIDlet name is not changed to the new language, as localization is done only during MIDlet installation. In Series 40 the MIDlet name is always the localized name based on the device language, if one is available in the given MIDlet.

This feature is available since Series 40 5th Edition FP 1 and Symbian^3 (JRT 2.1).

Device pre-installed MIDlets

In Java Runtime 2.1 for Symbian the values of Nokia-MIDlet-Name-<locale> and Nokia-MIDlet-<n>-<locale> should be used when pre-installing MIDlets.

In Symbian, there is a known issue with localized MIDlet names used for pre-installed MIDlets: If there is no SIM card in the device when the device is booted for the first time, the user is presented with a prompt to select the device user interface language. The pre-installed MIDlets are installed in the background during the first boot of the device. If the user does not respond to the user interface language selection dialog during device boot, pre-installation might happen before locale is known and the non-localized name is used. If there is a (U)SIM card, the device automatically selects the device language based on (U)SIM card and localized names are used for pre-installed MIDlets.

Note: In Series 40, localized names for pre-installed MIDlets are always based on the device language.

Example

For example if the MIDlet suite has the following attributes:

MIDlet-Name: Hello World
Nokia-MIDlet-Name-es-US: Hola Mundo muy padre
Nokia-MIDlet-Name-es: Hola Mundo
Nokia-MIDlet-Name-it: Ciao a tutti

MIDlet-1: MIDlet, /Icon.png, MainClass 
Nokia-MIDlet-1-en: Localised MIDlet

and the locale of the device is

  • es

There is a localized MIDlet suite name 'Hola Mundo', from attribute 'Nokia-MIDlet-Name-es' but no localized MIDlet name. The normal MIDlet name 'MIDlet' from attribute 'MIDlet-1' is used.

  • fr

No localized MIDlet suite name nor MIDlet name exists. Therefore, the normal MIDlet name and MIDlet suite name are used.

  • en-US

There is no localized MIDlet suite name nor MIDlet name matching locale 'en-US'. Java Runtime checks names for locale 'en'. The localized MIDlet name 'Localised MIDlet' is found from attribute 'Nokia-MIDlet-1-en'. There is no localized MIDlet suite name, so the normal suite name 'Hello World' from attribute 'MIDlet-Name' is used in Symbian. In Series 40 the normal MIDlet suite name is used. Both Symbian and Series 40 devices use 'Hello World' for MIDlet Suite name. MIDlet names are different, as Symbian devices use 'Localised MIDlet' and Series 40 devices use 'MIDlet'.

For more information on supported locales, see Supported locales.