Permalink
Browse files

add example of use of i18n-admin module in Samplest (related to #179)

  • Loading branch information...
xhanin committed Mar 31, 2015
1 parent 97655d4 commit c41aedaa2c5b6527191a0157e199923457b9ce2a
@@ -26,6 +26,7 @@
"io.restx:restx-server-simple:${restx.version}",
"io.restx:restx-apidocs:${restx.version}",
"io.restx:restx-specs-admin:${restx.version}",
"io.restx:restx-i18n-admin:${restx.version}",
"ch.qos.logback:logback-classic:${logback.version}"
],
"runtime": [
@@ -25,6 +25,7 @@
<dependency org="io.restx" name="restx-server-simple" rev="latest.integration" conf="default" />
<dependency org="io.restx" name="restx-apidocs" rev="latest.integration" conf="default" />
<dependency org="io.restx" name="restx-specs-admin" rev="latest.integration" conf="default" />
<dependency org="io.restx" name="restx-i18n-admin" rev="latest.integration" conf="default" />
<dependency org="ch.qos.logback" name="logback-classic" rev="1.0.13" conf="default" />
<dependency org="io.restx" name="restx-barbarywatch" rev="latest.integration" conf="runtime->default" />
<dependency org="io.restx" name="restx-specs-tests" rev="latest.integration" conf="test->default" />
@@ -80,6 +80,11 @@
<artifactId>restx-specs-admin</artifactId>
<version>${restx.version}</version>
</dependency>
<dependency>
<groupId>io.restx</groupId>
<artifactId>restx-i18n-admin</artifactId>
<version>${restx.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
@@ -6,9 +6,11 @@
import restx.admin.AdminModule;
import restx.factory.Module;
import restx.factory.Provides;
import restx.i18n.SupportedLocale;
import restx.security.*;
import javax.inject.Named;
import java.util.Locale;
/**
* Date: 1/12/13
@@ -26,6 +28,11 @@ public String appPackage() {
return "samplest";
}
@Provides
public SupportedLocale french() {
return new SupportedLocale(Locale.FRENCH);
}
@Provides
public BasicPrincipalAuthenticator basicPrincipalAuthenticator(SecuritySettings securitySettings,
final @Named("restx.admin.passwordHash") String adminPasswordHash) {
@@ -0,0 +1 @@
welcome=Welcome!
@@ -0,0 +1 @@
welcome=Bienvenue RESTX !

0 comments on commit c41aeda

Please sign in to comment.