1.中文配置 (framework/common/config/general.properties)html
currency.uom.id.default=CNYjava
locale.properties.fallback=zn_CNmysql
country.geo.id.default=CHNweb
2.頁面日曆亂碼 (framework/images/webapp/images/calendarDateSelect/locale/zh.js)
sql
Date.weekdays = $w("一 二 三 四 五 六 日");
Date.months = $w("一 二 三 四 五 六 七 八 九 十 十一 十二" );
Date.first_day_of_week = 1
_translations = {
"OK": "肯定",
"Now": "如今",
"Today": "今天"
}apache
3.保存到mysql數據亂碼,修改紅色文字地方: (framework/entity/config/entityengine.xml)
app
<datasource name="localmysql"
helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
field-type-name="mysql"
check-on-start="true"
add-missing-on-start="true"
check-pks-on-start="false"
use-foreign-keys="true"
join-style="ansi-no-parenthesis"
alias-view-columns="false"
drop-fk-use-foreign-key-keyword="true"
table-type="InnoDB"
character-set="utf8"
collate="utf8_general_ci">
<read-data reader-name="seed"/>
<read-data reader-name="seed-initial"/>
<read-data reader-name="demo"/>
<read-data reader-name="ext"/>
<inline-jdbc
jdbc-driver="com.mysql.jdbc.Driver"
jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true&useOldAliasMetadataBehavior=true&useUnicode=true&characterEncoding=utf-8"
jdbc-username="root"
jdbc-password="123456"
isolation-level="ReadCommitted"
pool-minsize="2"
pool-maxsize="250"
time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
and had to set it to -1 in order to avoid this issue.
For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
<!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
</datasource>
webapp