
com.github.rahulsom.rpi18njson.MessageModule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rp-i18n-json Show documentation
Show all versions of rp-i18n-json Show documentation
Adds support for serving i18n Message Bundles using JSON
The newest version!
package com.github.rahulsom.rpi18njson;
import com.google.inject.Singleton;
import ratpack.guice.ConfigurableModule;
/**
* Manages i18n Bundles for SPAs by serving them as json
*/
public class MessageModule extends ConfigurableModule {
public static class Config {
private String bundleName = "messages";
public String getBundleName() {
return bundleName;
}
public Config bundleName(String bundleName) {
this.bundleName = bundleName;
return this;
}
}
@Override
protected void configure() {
bind(MessageHandler.class).in(Singleton.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy