如何解决该问题-请安装"intl"扩展以提供完整的本地化功能 [英] How to solve the issue - please install the "intl" extension for full localization capabilities

查看:326
本文介绍了如何解决该问题-请安装"intl"扩展以提供完整的本地化功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要什么

我已经实现的代码:

use Symfony\Component\Intl\Intl;
                
\Locale::setDefault('en');
$currencies = Intl::getCurrencyBundle()->getCurrencyNames();

$currency = Intl::getCurrencyBundle()->getCurrencyName('INR');

$symbol = Intl::getCurrencyBundle()->getCurrencySymbol('INR');

$fractionDigits = Intl::getCurrencyBundle()->getFractionDigits('INR');

$roundingIncrement = Intl::getCurrencyBundle()->getRoundingIncrement('INR');
              

错误:

未实现Symfony \ Component \ Intl \ Locale \ Locale :: setDefault().请安装"intl"扩展以提供完整的本地化功能.

The Symfony\Component\Intl\Locale\Locale::setDefault() is not implemented. Please install the "intl" extension for full localization capabilities.

500内部服务器错误-MethodNotImplementedException

500 Internal Server Error - MethodNotImplementedException

操作系统配置:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.04
DISTRIB_CODENAME=raring
DISTRIB_DESCRIPTION="Ubuntu 13.04"
NAME="Ubuntu"
VERSION="13.04, Raring Ringtail"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 13.04"
VERSION_ID="13.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

  • 我已将此链接用于intln安装 http://php.net/manual/zh/intl.setup.php .
    • I have referred this link for intln installation http://php.net/manual/en/intl.setup.php.
    • 推荐答案

      您只需要在终端上放一行即可:

      You need just put one line to the terminal:

      sudo apt-get install php5-intl
      

      这篇关于如何解决该问题-请安装"intl"扩展以提供完整的本地化功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆