2019-06-05 01:44:57 +03:00
|
|
|
package com.baeldung.autoservice;
|
|
|
|
|
2019-06-05 02:00:53 +03:00
|
|
|
import com.google.auto.service.AutoService;
|
|
|
|
|
2019-06-05 01:44:57 +03:00
|
|
|
import java.util.Locale;
|
|
|
|
|
2019-06-16 09:31:29 +03:00
|
|
|
@AutoService(TranslationService.class)
|
|
|
|
public class GoogleTranslationServiceProvider implements TranslationService {
|
2019-06-05 01:44:57 +03:00
|
|
|
|
|
|
|
public String translate(String message, Locale from, Locale to) {
|
2019-06-17 14:52:29 +03:00
|
|
|
|
2019-06-17 14:57:45 +03:00
|
|
|
// implementation details
|
2019-06-17 14:52:29 +03:00
|
|
|
return message + " (translated by Google)";
|
2019-06-05 01:44:57 +03:00
|
|
|
}
|
|
|
|
}
|