|
|
|
UTF-8 resourceBundle
|
|||
|---|---|---|---|
|
#18+
Здравствуете. Вот так всё прекрасно работает Код: java 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. но не видно правильно кириллицы Пробую поставить UTF-8 (перед этим перекодировав в файлы соответственно) ( http://www.localizeyourapps.com/developer/working-on-utf8-resourcebundle-in-java/ ) Код: java 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. получаю No message found under code ... Кто-нибудь сталкивался? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.04.2012, 09:23:04 |
|
||
|
UTF-8 resourceBundle
|
|||
|---|---|---|---|
|
#18+
debugger в руки брать не пробовал? весьма вероятно, что ReloadableResourceBundleMessageSource ищет файлы не там, где ты думаешь авторIn contrast to ResourceBundleMessageSource, this class supports reloading of properties files through the "cacheSeconds" setting, and also through programmatically clearing the properties cache. Since application servers do typically cache all files loaded from the classpath, it is necessary to store resources somewhere else (for example, in the "WEB-INF" directory of a web app). Otherwise changes of files in the classpath are not reflected in the application. Note that the base names set as the "basename" and "basenames" properties are treated in a slightly different fashion than the "basename" property of ResourceBundleMessageSource. It follows the basic ResourceBundle rule of not specifying file extension or language codes, but can refer to any Spring resource location (instead of being restricted to classpath resources). With a "classpath:" prefix, resources can still be loaded from the classpath, but "cacheSeconds" values other than "-1" (caching forever) will not work in this case. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.04.2012, 12:17:25 |
|
||
|
UTF-8 resourceBundle
|
|||
|---|---|---|---|
|
#18+
А как это дело дебугить? (ну тут ловить вызовы функций открытия файлов?) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.04.2012, 12:23:44 |
|
||
|
UTF-8 resourceBundle
|
|||
|---|---|---|---|
|
#18+
Пробую Код: java 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. авторorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource' defined in ServletContext resource [/ WEB-INF/spring-applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExce ption: Invalid property 'classpath:' of bean class [org.springframework.context.support.ReloadableResourceBundleMessageSource]: Bean propert ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.04.2012, 12:31:42 |
|
||
|
UTF-8 resourceBundle
|
|||
|---|---|---|---|
|
#18+
<property name="classpath:"> Что за property такое? classpath: это для значений префикс. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.04.2012, 12:34:42 |
|
||
|
UTF-8 resourceBundle
|
|||
|---|---|---|---|
|
#18+
Наверно где-то близко, но не получается Код: java 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. авторNo message found ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.04.2012, 12:47:08 |
|
||
|
UTF-8 resourceBundle
|
|||
|---|---|---|---|
|
#18+
Файлы все в UTF ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.04.2012, 12:47:41 |
|
||
|
UTF-8 resourceBundle
|
|||
|---|---|---|---|
|
#18+
Я не углублялся в причины и следствия, но преперти нормально читаются только при кодированном тексте. Скажем, пропертис languages.eng=Анг languages.rus=Рус выглядят при просмотре обычным редактором как languages.eng=Анг languages.rus=Рус Для нормальной работы в эеклипсе я использую плагин jp.gr.java_conf.ussiy.app.propedit_5.0.0.jar, который показывает мне пропертис обычным текстом. До того, как я его нашел, пробовал еще парочку - один шел так же плагином, но не очень удобный, другой - отдельной программой, тоже не шибко удобный, но у него была одно удобное свойство - он показывал сразу пропертис для всех языковых файлов, поэтому было видно соответствие сообщений в разных языках. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.04.2012, 14:26:07 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=37740025&tid=2132110]: |
0ms |
get settings: |
8ms |
get forum list: |
13ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
31ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
45ms |
get tp. blocked users: |
1ms |
| others: | 340ms |
| total: | 457ms |

| 0 / 0 |
