Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public static class MyConfiguration extends AppConfigurator {
  2. @Override
  3. public void configure() {
  4. templatePathResolver(new TemplatePathResolver() {
  5. @Override
  6. protected String resolveTemplatePath(String path, ActContext context) {
  7. String resolved = super.resolveTemplatePath(path, context);
  8. Locale locale = context.locale(true);
  9. if ("zh".equals(locale.getLanguage())) {
  10. resolved = "/cn" + (resolved.startsWith("/") ? "" : "/") + resolved;
  11. }
  12. return resolved;
  13. }
  14. });
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement