Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
AppLocale Class Reference
Inheritance diagram for AppLocale:
PKPLocale PKPLocale

Static Public Member Functions

static getLocale ()
 
static getLocalePrecedence ()
 
static getLocalePrecedence ()
 
static getPrimaryLocale ()
 
static getPrimaryLocale ()
 
static getSupportedFormLocales ()
 
static getSupportedFormLocales ()
 
static getSupportedLocales ()
 
static getSupportedLocales ()
 
static installLocale ($locale)
 
static makeComponentMap ($locale)
 
static requireComponents ()
 
static setPrimaryLocale ($primaryLocale)
 
static setSupportedLocales ($supportedLocales)
 
static setTranslations ($translations)
 
static translate ($key, $params=array(), $locale=null)
 
static uninstallLocale ($locale)
 
- Static Public Member Functions inherited from PKPLocale
static _allLocalesCacheMiss ($cache, $id)
 
static & _getAllLocalesCache ()
 
static & _getAllLocalesCacheContent ()
 
static get2LetterFrom3LetterIsoLanguage ($iso3Letter)
 
static get3LetterFrom2LetterIsoLanguage ($iso2Letter)
 
static get3LetterIsoFromLocale ($locale)
 
static & getAllLocales ()
 
static getFilenameComponentMap ($locale)
 
static getIso1FromIso3 ($iso3)
 
static getIso1FromLocale ($locale)
 
static getIso3FromIso1 ($iso1)
 
static getIso3FromLocale ($locale)
 
static & getLocaleFiles ($locale=null)
 
static getLocaleFrom3LetterIso ($iso3Letter)
 
static getLocaleFromIso3 ($iso3)
 
static getLocaleStyleSheet ($locale)
 
static getParameterNames ($source)
 
static getTimeZone ()
 
static initialize ($request)
 
static installLocale ($locale)
 
static isLocaleComplete ($locale)
 
static isLocaleValid ($locale)
 
static & loadLocaleList ($filename)
 
static makeComponentMap ($locale)
 
static registerLocaleFile ($locale, $filename, $addToTop=false)
 
static reloadLocale ($locale)
 
static requireComponents ()
 
static translate ($key, $params=array(), $locale=null)
 
static uninstallLocale ($locale)
 

Detailed Description

Mock implementation of the Locale class.

Definition at line 19 of file AppLocale.inc.php.

Member Function Documentation

static AppLocale::getLocale ( )
static

Return the key name of the user's currently selected locale (default is "en_US" for U.S. English).

Returns
string

Definition at line 63 of file AppLocale.inc.php.

References SessionManager\getManager(), getSupportedLocales(), Config\getVar(), and PKPLocale\isLocaleValid().

Referenced by LanguageDAO\_getCache(), MonographDAO\_getFetchParameters(), AboutSiteHandler\aboutThisPublishingSystem(), TinyMCEPlugin\callback(), SiteSetupForm\deleteFile(), SubmissionChecklistGridHandler\deleteItem(), InstallForm\display(), PayPalPlugin\displayPaymentForm(), ControlledVocabDAO\enumerate(), NewSiteImageFileForm\execute(), NewContextImageFileForm\execute(), PreparedEmailForm\execute(), AuthorForm\execute(), Dc11SchemaPublicationFormatAdapter\extractMetadataFromDataObject(), SiteSetupForm\fetch(), PKPAnnouncementTypeDAO\getAnnouncementTypeName(), AuthorDAO\getAuthorsAlphabetizedByPress(), SeriesEditorSubmissionDAO\getById(), PublishedMonographDAO\getByPressId(), SeriesDAO\getByPressId(), MonographDAO\getBySubEditorId(), getLocalePrecedence(), Submission\getLocalizedData(), Site\getLocalizedPageHeaderTitle(), Context\getLocalizedSetting(), Press\getPageHeaderLogo(), Press\getPageHeaderTitle(), ReviewerSubmissionDAO\getReviewerSubmission(), ReviewerSubmissionDAO\getReviewerSubmissionsByReviewerId(), MetadataDescription\getStatements(), EventLogEntry\getTranslatedMessage(), PreparedEmailForm\initData(), AuthorForm\initData(), PKPSubmissionSubmitStep1Form\initData(), UserGroupGridHandler\initialize(), CategoryCategoryGridHandler\initialize(), PKPLocale\initialize(), SettingsDAO\installSettings(), SiteSettingsDAO\installSettings(), SubmissionChecklistGridHandler\loadData(), TemplateBasedFilter\process(), SettingsDAO\reloadDefaultSetting(), SiteSetupForm\renderFileView(), PKPLocale\requireComponents(), SubmissionChecklistGridHandler\setDataElementSequence(), and PKPLocale\translate().

static AppLocale::getLocalePrecedence ( )
static

Mocked method

Returns
array a test array of locales

Definition at line 64 of file env1/MockAppLocale.inc.php.

static AppLocale::getLocalePrecedence ( )
static

Get the stack of "important" locales, most important first.

Returns
array

Definition at line 126 of file AppLocale.inc.php.

References getLocale().

static AppLocale::getPrimaryLocale ( )
static

Mocked method

Returns
string

Definition at line 95 of file env1/MockAppLocale.inc.php.

static AppLocale::getSupportedFormLocales ( )
static

Get all supported form locales for the current context.

Returns
array

Definition at line 43 of file AppLocale.inc.php.

References PKPLocale\getAllLocales(), and Config\getVar().

Referenced by MonographONIX30XmlFilter\createProductNode(), MultilingualListbuilderGridColumn\MultilingualListbuilderGridColumn(), and GridCellProvider\render().

static AppLocale::getSupportedFormLocales ( )
static

Mocked method

Returns
array

Definition at line 124 of file env1/MockAppLocale.inc.php.

static AppLocale::getSupportedLocales ( )
static
static AppLocale::getSupportedLocales ( )
static

Mocked method

Returns
array

Definition at line 116 of file env1/MockAppLocale.inc.php.

static AppLocale::installLocale (   $locale)
static

Install support for an existing locale.

Parameters
$localestring

Definition at line 172 of file AppLocale.inc.php.

References DAORegistry\getDAO().

Referenced by InstallLanguageForm\execute(), and PKPLocale\reloadLocale().

static AppLocale::makeComponentMap (   $locale)
static

Make a map of components to their respective files.

Parameters
$localestring
Returns
array

Definition at line 203 of file AppLocale.inc.php.

Referenced by genTestLocale\execute(), and PKPLocale\getFilenameComponentMap().

static AppLocale::requireComponents ( )
static

method required during setup of the PKP templating engine and application framework

Definition at line 56 of file env1/MockAppLocale.inc.php.

Referenced by ContextSiteSettingsForm\_loadDefaultUserGroups(), ManageCatalogHandler\_setupMonographsTemplate(), AboutContextHandler\AboutContextHandler(), AboutSiteHandler\AboutSiteHandler(), PKPUserHandler\authorizationDenied(), PKPAuthorGridHandler\authorize(), PublicationFormatGridHandler\authorize(), MarketsGridHandler\authorize(), PublicationDateGridHandler\authorize(), SalesRightsGridHandler\authorize(), IdentificationCodeGridHandler\authorize(), UserUserGroupListbuilderHandler\authorize(), CatalogBookHandler\book(), CatalogEntrySubmissionReviewForm\CatalogEntrySubmissionReviewForm(), AdminContextHandler\contexts(), CopyAccessLogFileTool\CopyAccessLogFileTool(), SeriesGridHandler\deleteSeries(), ManualPaymentPlugin\displayPaymentForm(), PayPalPlugin\displayPaymentForm(), PressSiteSettingsForm\execute(), Dc11SchemaPublicationFormatAdapter\extractMetadataFromDataObject(), LibraryFileForm\fetch(), SubmissionMetadataHandler\fetch(), SelectMonographHandler\fetch(), ContributorForm\fetch(), SponsorForm\fetch(), GenreForm\fetch(), PKPToolsHandler\generateReport(), GridHandler\getGridRangeInfo(), PKPSubmissionMetadataViewForm\getLocaleFieldNames(), PendingRevisionsNotificationManager\getNotificationContents(), SignoffNotificationManager\getNotificationMessage(), PendingRevisionsNotificationManager\getNotificationMessage(), UserGroupDAO\getTranslationKeyFromId(), ManualPaymentPlugin\handle(), PageHandler\header(), PreparedEmailForm\initData(), ChapterForm\initData(), CatalogEntryFormatMetadataForm\initData(), ReviewerForm\initData(), UserHandler\initialize(), AdminLanguageGridHandler\initialize(), ManagementHandler\initialize(), SetupGridHandler\initialize(), AuthorProofingSignoffFilesGridHandler\initialize(), LanguageGridHandler\initialize(), BlockPluginsListbuilderHandler\initialize(), UnassignedSubmissionsListGridHandler\initialize(), PressSettingsTabHandler\initialize(), ReviewerReviewAttachmentsGridHandler\initialize(), PluginGridHandler\initialize(), ProofFilesListbuilderHandler\initialize(), CopyeditingFilesListbuilderHandler\initialize(), PublicationEntryHandler\initialize(), ArchivedSubmissionsListGridHandler\initialize(), ExportableUsersGridHandler\initialize(), AdminSettingsTabHandler\initialize(), AuthorSignoffFilesGridHandler\initialize(), VersionInfoGridHandler\initialize(), ServerInfoGridHandler\initialize(), ContextGridHandler\initialize(), NotificationsGridHandler\initialize(), SystemInfoGridHandler\initialize(), UserGridHandler\initialize(), UserGroupGridHandler\initialize(), NotifyUsersListbuilderHandler\initialize(), CategoryCategoryGridHandler\initialize(), ManageLanguageGridHandler\initialize(), AdminHandler\initialize(), Plugin\installData(), GenreDAO\installDefaults(), MonographlessCatalogEntryLinkAction\MonographlessCatalogEntryLinkAction(), NotifyLinkAction\NotifyLinkAction(), PoliciesForm\PoliciesForm(), EditorAction\recordDecision(), PKPToolsHandler\reportGenerator(), ManagerHandler\setupTemplate(), PublicationFormatHandler\setupTemplate(), SeriesGridRow\setupTemplate(), InformationHandler\setupTemplate(), FilesListbuilderHandler\setupTemplate(), DashboardHandler\setupTemplate(), PKPInstallHandler\setupTemplate(), PKPAuthorDashboardHandler\setupTemplate(), LoginHandler\setupTemplate(), ReportGeneratorHandler\setupTemplate(), PKPSubmissionHandler\setupTemplate(), NotificationHandler\setupTemplate(), SiteSetupForm\SiteSetupForm(), ContextSettingsWizardHandler\startWizard(), and SubmissionFilesArtworkMetadataForm\SubmissionFilesArtworkMetadataForm().

static AppLocale::setPrimaryLocale (   $primaryLocale)
static

Setter to configure a custom primary locale for testing.

Parameters
$primaryLocalestring

Definition at line 87 of file env1/MockAppLocale.inc.php.

Referenced by PKPLocaleTest\testGetLocaleFrom3LetterIso().

static AppLocale::setSupportedLocales (   $supportedLocales)
static

Setter to configure a custom primary locale for testing.

Parameters
$supportedLocalesarray example array( 'en_US' => 'English', 'de_DE' => 'German' )

Definition at line 108 of file env1/MockAppLocale.inc.php.

Referenced by PKPLocaleTest\testGetLocaleFrom3LetterIso().

static AppLocale::setTranslations (   $translations)
static

Set translation keys to be faked.

Parameters
$translationsarray

Definition at line 132 of file env1/MockAppLocale.inc.php.

Referenced by StringTest\testTitleCase().

static AppLocale::translate (   $key,
  $params = array(),
  $locale = null 
)
static

Mocked method

Parameters
$keystring
$paramsarray named substitution parameters
$localestring the locale to use
Returns
string

Definition at line 75 of file env1/MockAppLocale.inc.php.

static AppLocale::uninstallLocale (   $locale)
static

Uninstall support for a new locale.

Parameters
$localestring

Definition at line 188 of file AppLocale.inc.php.

References DAORegistry\getDAO().

Referenced by PKPLocale\reloadLocale().


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