ERXLanguageMenu Class Reference

Inherits er::extensions::components::ERXStatelessComponent.

Collaboration diagram for ERXLanguageMenu:

Collaboration graph
[legend]

List of all members.

Public Member Functions

NSArray availableLanguages ()
String displayStringForLanguage ()
 ERXLanguageMenu (WOContext context)
String languageOption ()
void reset ()
void setLanguageOption (String languageOption)

Private Member Functions

NSDictionary< String, StringdisplayStringForLanguages ()

Private Attributes

String _languageOption

Static Private Attributes

static NSDictionary< String,
String
displayStringForLanguages
static final String localizeDisplayStringsKey = "localizeDisplayStrings"


Detailed Description

A simple popup menu for language selection. The menu itself is can be localized in two different ways. It allows all language names to be presented in the current localized language, or each language name can be presented in its native language. The Localizable.strings keys for these language names are simply the English language name for that language. For example, if you were to localize this menu in an application that supports English and German, you would have:

 "English" = "English";
 "German" = "German";
 

in your English.lproj/Localizable.strings file, and

 "English" = "Englisch";
 "German" = "Deutsch";
 

in your German.lproj/Localizable.strings file. Beyond that, you only need to stick it in a form and bind the language binding to something that stores a language value. For example, your WOD file might contain: LanguageMenu: ERXLanguageMenu { language = session.language; }

Author:
Ramsey Gurley class (optional) the html class attribute string dir (optional) the html dir attribute string. Defines the text direction and should only be equal to "ltr" for "left to right" text direction or "rtl" for "right to left" text direction. disabled (optional) the html disabled attribute string. This is passed directly to the component so you should only bind the string value "disabled" if you wish to disable the component. Otherwise, leave it unbound. id (optional) the html id attribute string. Each id value should be unique and not repeated on the same page. language the language selected in the menu. localizeDisplayStrings (optional) if true, this will cause each language name to be displayed in its native language. If false, all languages will be presented in the current language. noSelectionString (optional) the string presented to indicate a null or empty selection. size (optional) the html size attribute string. This defines the maximum number of menu items to display. style (optional) the html style attribute string title (optional) the html title attribute string

Constructor & Destructor Documentation

ERXLanguageMenu ( WOContext  context  ) 


Member Function Documentation

NSArray availableLanguages (  ) 

String displayStringForLanguage (  ) 

Returns:
the displayString value for the language

NSDictionary<String, String> displayStringForLanguages (  )  [private]

Returns:
an array of localized language names

String languageOption (  ) 

Returns:
the languageOption

void reset (  ) 

Reimplemented from ERXStatelessComponent.

void setLanguageOption ( String  languageOption  ) 

Parameters:
languageOption the languageOption to set


Member Data Documentation

NSDictionary<String, String> displayStringForLanguages [static, private]

final String localizeDisplayStringsKey = "localizeDisplayStrings" [static, private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:05 2012 for Project Wonder by  doxygen 1.5.8