Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class MyConfiguration extends AppConfigurator {
- @Override
- public void configure() {
- templatePathResolver(new TemplatePathResolver() {
- @Override
- protected String resolveTemplatePath(String path, ActContext context) {
- String resolved = super.resolveTemplatePath(path, context);
- Locale locale = context.locale(true);
- if ("zh".equals(locale.getLanguage())) {
- resolved = "/cn" + (resolved.startsWith("/") ? "" : "/") + resolved;
- }
- return resolved;
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement