"Nikerabbit" posted a comment on MediaWiki.r106496.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/106496#c27923

Commit summary for MediaWiki.r106496:

finished adding support for country lists, making backwards compatible with 
1.18 since we need this for fundraising servers

Nikerabbit's comment:

You can use this snippet from Translate extension:
<source lang=php>

                // BC <1.19
                if ( method_exists( 'Language', 'getFallbacksFor' ) ) {
                        $list = Language::getFallbacksFor( $code );
                        array_pop( $list ); // Get 'en' away from the end
                        $fallbacks = array_merge( $list , $fallbacks );
                } else {
                        $realFallback = $code ? Language::getFallbackFor( $code 
) : false;
                        if ( $realFallback && $realFallback !== 'en' ) {
                                $fallbacks = array_merge( array( $realFallback 
), $fallbacks );
                        }
                }
</source>

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to