Language translation using PHP

后端 未结 6 1461
名媛妹妹
名媛妹妹 2021-01-03 13:51

Hi i am devloping sample site in php i need to translate whole website in to persian. how can it possible in php?? I have tried using the following code.. This code will wor

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-03 14:11

    @rbenmass Thank You :-)

    I think it have to be , because it runs good for me :

        /* 
        original from @rbenmass :
    
        function translate($q, $sl, $tl){
    
        if($s==$e || $s=='' || $e==''){
            return $q;
    
        }
         **/
    
    function translate($q, $sl, $tl){
    
    if($sl==$tl || $sl=='' || $tl==''){
        return $q;
    
    }
    //  ...  //
    

提交回复
热议问题