LocaleType::configureOptions()

configureOptions(OptionsResolver $resolver) Configures the options for this type. Parameters OptionsResolver $resolver The resolver for the options

LocaleType

class LocaleType extends AbstractType Methods buildForm(FormBuilderInterface $builder, array $options) Builds the form. from AbstractType buildView(FormView $view, FormInterface $form, array $options) Builds the form view. from AbstractType finishView(FormView $view, FormInterface $form, array $options) Finishes the form view. from AbstractType configureOptions(OptionsResolver $resolver) Configures the options for this type. string getBlockPrefix() Returns the prefix of th

LocaleScanner::scanLocales()

array scanLocales(string $sourceDir) Returns all locales found in the given directory. Parameters string $sourceDir The directory with ICU files Return Value array An array of locales. The result also contains locales that are in fact just aliases for other locales. Use {@link scanAliases()} to determine which of the locales are aliases

LocaleScanner::scanAliases()

array scanAliases(string $sourceDir) Returns all locale aliases found in the given directory. Parameters string $sourceDir The directory with ICU files Return Value array An array with the locale aliases as keys and the aliased locales as values

LocaleScanner

class LocaleScanner Scans a directory with data files for locales. The name of each file with the extension ".txt" is considered, if it "looks" like a locale: the name must start with two letters; the two letters may optionally be followed by an underscore and any sequence of other symbols. For example, "de" and "de_DE" are considered to be locales. "root" and "meta" are not. Methods array scanLocales(string $sourceDir) Returns all locales found in the given directory. array scanAli

LocaleListener::onKernelRequest()

onKernelRequest(GetResponseEvent $event) Parameters GetResponseEvent $event

LocaleListener::onKernelFinishRequest()

onKernelFinishRequest(FinishRequestEvent $event) Parameters FinishRequestEvent $event

LocaleListener::getSubscribedEvents()

static array getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: array('eventName' => 'methodName') array('eventName' => array('methodName', $priority)) a

LocaleListener

class LocaleListener implements EventSubscriberInterface Initializes the locale based on the current request. Methods __construct(RequestStack $requestStack, string $defaultLocale = 'en', RequestContextAwareInterface $router = null) Constructor. onKernelRequest(GetResponseEvent $event) onKernelFinishRequest(FinishRequestEvent $event) static array getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. Details

LocaleDataProvider::getNames()

getNames($displayLocale = null) Parameters $displayLocale