public static function getI18n(
        $backendContext,
        $requestedLangId,
        ModelCriteria &$search,
        $currentLocale,
        $columns,
        $foreignTable,
        $foreignKey,
        $forceReturn = false,
        $localeAlias = null
    ) {
        // If a lang has been requested, find the related Lang object, and get the locale
        if ($requestedLangId !== null) {
            $localeSearch = LangQuery::create()->findByIdOrLocale($requestedLangId);

            if ($localeSearch === null) {
                throw new \InvalidArgumentException(
                    sprintf(
                        'Incorrect lang argument given : lang %s not found',
                        $requestedLangId
                    )
                );
            }

            $locale = $localeSearch->getLocale();
        } else {
            // Use the currently defined locale
            $locale = $currentLocale;
        }

        // Call the proper method depending on the context: front or back
        if ($backendContext) {
            self::getBackEndI18n($search, $locale, $columns, $foreignTable, $foreignKey, $localeAlias);
        } else {
            self::getFrontEndI18n($search, $locale, $columns, $foreignTable, $foreignKey, $forceReturn, $localeAlias);
        }

        return $locale;
    }
public static function getI18n(
        $backendContext,
        $requestedLangId,
        ModelCriteria &$search,
        $currentLocale,
        $columns,
        $foreignTable,
        $foreignKey,
        $forceReturn = false,
        $localeAlias = null
    ) {
        // If a lang has been requested, find the related Lang object, and get the locale
        if ($requestedLangId !== null) {
            $localeSearch = LangQuery::create()->findByIdOrLocale($requestedLangId);

            if ($localeSearch === null) {
                throw new \InvalidArgumentException(
                    sprintf(
                        'Incorrect lang argument given : lang %s not found',
                        $requestedLangId
                    )
                );
            }

            $locale = $localeSearch->getLocale();
        } else {
            // Use the currently defined locale
            $locale = $currentLocale;
        }

        // Call the proper method depending on the context: front or back
        if ($backendContext) {
            self::getBackEndI18n($search, $locale, $columns, $foreignTable, $foreignKey, $localeAlias);
        } else {
            self::getFrontEndI18n($search, $locale, $columns, $foreignTable, $foreignKey, $forceReturn, $localeAlias);
        }

        return $locale;
    }
public static function getI18n ( $ backendContext , $ requestedLangId , ModelCriteria & $ search , $ currentLocale , $ columns , $ foreignTable , $ foreignKey , $ forceReturn = false , $ localeAlias = null ) { // If a lang has been requested, find the related Lang object, and get the locale if ( $ requestedLangId !== null ) { $ localeSearch = LangQuery :: create ( ) -> findByIdOrLocale ( $ requestedLangId ) ; if ( $ localeSearch === null ) { throw new \ InvalidArgumentException ( sprintf ( 'Incorrect lang argument given : lang %s not found' , $ requestedLangId ) ) ; } $ locale = $ localeSearch -> getLocale ( ) ; } else { // Use the currently defined locale $ locale = $ currentLocale ; } // Call the proper method depending on the context: front or back if ( $ backendContext ) { self :: getBackEndI18n ( $ search , $ locale , $ columns , $ foreignTable , $ foreignKey , $ localeAlias ) ; } else { self :: getFrontEndI18n ( $ search , $ locale , $ columns , $ foreignTable , $ foreignKey , $ forceReturn , $ localeAlias ) ; } return $ locale ; }
Bild query to retrieve I18n

@param bool $backendContext
@param int $requestedLangId
@param ModelCriteria $search
@param string $currentLocale
@param array $columns
@param string $foreignTable
@param string $foreignKey
@param bool $forceReturn
@param string|null $localeAlias le local table if different of the main query table

@return string
Bild query to retrieve I18n