在cakephp 2+中将月份名称更改为印度尼西亚语

时间:2016-02-01 13:06:48

标签: php cakephp

我想在默认日期时间选择器

中更改语言

我在bootstrap.php中设置了以下配置

<bean name="cpaibmmq" class="org.apache.camel.component.jms.JmsComponent" destroy-method="doStop">
    <property name="transacted" value="${jms.transacted}" />
    <property name="concurrentConsumers" value="${cpa.concurrentConsumers}" />
    <property name="maxConcurrentConsumers" value="${cpa.concurrentConsumers}" />
    <property name="acceptMessagesWhileStopping" value="${jms.acceptMessagesWhileStopping}" />
    <property name="acknowledgementModeName" value="${jms.acknowledgementModeName}" />
    <property name="cacheLevelName" value="${jms.cacheLevelName}" />
    <property name="connectionFactory" ref="ibmFac1" />
    <property name="exceptionListener" ref="ibmFac1" />
</bean>

<bean id="ibmFac1" class="org.springframework.jms.connection.SingleConnectionFactory" destroy-method="destroy">
    <constructor-arg>
        <bean class="com.ibm.mq.jms.MQQueueConnectionFactory">
            <property name="transportType" value="1" />
            <property name="channel" value="${cpa.wmq.channel}" />
            <property name="hostName" value="${cpa.wmq.hostname}" />
            <property name="port" value="${cpa.wmq.port}" />
            <property name="queueManager" value="${cpa.wmq.mqmanager}" />
        </bean>
    </constructor-arg>
</bean>

... app \ Locale \ id \ LC_MESSAGES \ default.po文件包含

 Configure::write('Config.language', 'id');
 setlocale(LC_ALL, 'id');

我的观看文件包含

 msgid "january"
 msgstr "januari"

未翻译的月份。哪里出错?

enter image description here

1 个答案:

答案 0 :(得分:0)

我找到了答案, bootstrap文件只需要语言配置。它接受两个以下。

 Configure::write('Config.language', 'id');
 Configure::write('Config.language', 'ind');

文件结构应该是

...app\Locale\ind\LC_MESSAGES\cake.po