<?php
/**
 * Created by IntelliJ IDEA.
 * User: victor
 * Date: 08.11.17
 * Time: 13:36
 */

class LangHelper
{
    public static function urlOtherLang($culture)
    {
        $other_lang = $culture === 'ru' ? 'en' : 'ru';
        return str_replace(
            '/'.$culture . '/',
            '/'.$other_lang.'/',
            sfContext::getInstance()->getRequest()->getUri()
        );
    }
}