fecmall 多语言,语言简码说明

经验分享 · Fecmall · 于 3年前 发布 · 1091 次阅读

fecmall 多语言,语言简码。

1.在appfront/web下的各个文件夹对应的语言名称

ar   ar-AE  阿拉伯语言  عربى
cn  zh-CN 中文 中文
de  de-DE 德语 Deutsche
en en-US  英语 English
es  es-ES 西班牙语 Español
fr  fr-FR 法语 Français
it  it-IT 意大利语 Italiano
jp  ja-JP 日语 日本語
kr  ko-KR 韩语 한국어
nl  nl-NL 荷兰语 Nederlands
pt  pt-PT  葡萄牙语 Português
ru ru-RU 俄语 Pусский
tw  zh-TW 中文繁体 中文繁體

2.nginx添加配置


	location /fr/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /fr/index.php last;
        }
	}
    
    location /jp/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /jp/index.php last;
        }
	}
	
	location /it/ {
       	 	index index.php;
        	if (!-e $request_filename){
                	rewrite . /it/index.php last;
        	}
        }

	location /es/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /es/index.php last;
        }
	}

	location /cn/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /cn/index.php last;
        }
    }

	location /de/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /de/index.php last;
        }
    }
    
    
    location /ar/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /ar/index.php last;
        }
    }
    
    location /en/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /en/index.php last;
        }
    }
    
    location /kr/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /kr/index.php last;
        }
    }
    
    location /nl/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /nl/index.php last;
        }
    }
    
    location /pt/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /pt/index.php last;
        }
    }
    
    location /ru/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /ru/index.php last;
        }
    }
    
    location /tw/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /tw/index.php last;
        }
    }
共收到 2 条回复
ascending#13年前 0 个赞

请问将来会有“一键删除语言包”的按键吗?就是按一个按钮就把网站目录下所有选定语言的物理文件夹清除掉:blush: :blush: (有轻微洁癖,哈哈)我现在都是手动一个文件夹一个文件夹的找到,删除的。这个需求能解决最好,不弄也行:smiley:

Fecmall#23年前 0 个赞

1.不用删除,通过nginx配置做一下屏蔽就不可以访问了

2.代码洁癖,是指的文件代码内容,而不是文件夹。

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics