我使用PHP Gettext扩展来本地化Web应用程序.当你这样做时:
bindtextdomain("example", "/locales");
Run Code Online (Sandbox Code Playgroud)
如果您将语言环境设置为fr_FR,它将在以下位置查找MO:
/locales/fr_FR/LC_MESSAGES/example.mo
Run Code Online (Sandbox Code Playgroud)
有没有办法自定义该路径?例如,我想使用以下结构:
/locales/example.fr_FR.mo
Run Code Online (Sandbox Code Playgroud)