我正在尝试建立一个多语言的网站。在我的根文件夹中,我有 Mat result;
result.create(img.rows,img.cols,img.type());
cvtColor(img,result,CV_RGB2XYZ);
int nr=result.rows;
int nc=result.cols*result.channels();
// XYZ to xyY
for (int i=0;i<nr;i++)
{
for (int j=0;j<nc;j++)
{
int X=result.at<Vec3b>(i,j)[2];
int Y=result.at<Vec3b>(i,j)[1];
int Z=result.at<Vec3b>(i,j)[0];
result.at<Vec3f>(i,j)[0]=X/(X+Y+Z);
result.at<Vec3f>(i,j)[1]=Y/(X+Y+Z);
result.at<Vec3f>(i,j)[2]=Y;
}
}
和另外3个文件夹:阿拉伯文,法文,英文,每个文件夹都包含网页。我想找到用户并将他们重定向到其语言的文件夹,并将英语设置为默认语言。在此过程中,我希望在index.php
中完成此操作,然后重定向到目标文件夹(例如:index.php
)。