CakePHP cache i18n translate

前端 未结 3 1200
日久生厌
日久生厌 2021-01-12 07:45

When I forget to translate something, somewhere Project VIEW, I change the file /app/Locale/por/LC_MESSAGES/default.po and sending it back to the server.

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-12 08:27

    To force the language to update you can clear the persistent and models directories in the /tmp/cache directory. If view caching is enabled you'll have to clean out views as well.

    Caching is disabled when debug is set to 2 (which is the value for using the framework during development) and the persistent directory is populated with new cache files, overwriting the old ones each time a view is loaded. So the debug switch and subsequent browser refresh might clean the old language files for you.

提交回复
热议问题