zoukankan      html  css  js  c++  java
  • Java国际化资源文件的选择

     

    如果Locale为:language_country,操作系统的Locale为xx_YY则选择资源文件的顺序为:

                  (一)如果存在message_language_country.properties,查找key值的顺序为:

                 message_language_country.properties

                 message_language.properties

                 message.properties

     (二)否则,如果存在message_language.properties,查找key值的顺序为:

                 message_language.properties

                 message.properties

     (三)否则,如果存在message_xx_YY.properties,查找key值的顺序为:

     message_xx_YY.properties

     message_xx.properites

     message.properties

     (四)否则,如果存在message_xx.properties,查找key值的顺序为:

     message_xx.properites

     message.properties

     (五)否则,如果存在message.properties,查找key值的顺序为:

     message.properties

    如果Locale为language,操作系统的Locale为xx_YY则选择资源文件的顺序为:

    1. message_language.properties
    2. message_xx_YY.properties
    3. message_xx.properties
    4. message.properties

    ps:首先需要确定使用哪个系列的资源文件(基本名称相同,语言和国家不同),其次确定优先使用哪个资源文件中的资源,再次确定当该资源文件中没有资源时查找其他资源文件的顺序

  • 相关阅读:
    vc6.0执行程序正确而debug版和release版运行错误
    visio调整画布大小和旋转画布
    Safecracker(暴力)
    gets()
    MATLAB——axis
    截尾平均数及利用SPSS求截尾平均数
    MATLAB求实数绝对值——abs
    MATLAB描绘饼图——pie
    error: expected unqualifiedid before 'int'
    MATLAB描绘极坐标图像——polar
  • 原文地址:https://www.cnblogs.com/chunchengwuchu/p/4029641.html
Copyright © 2011-2022 走看看