Sha256: e663028130718c237ec02c0fe99674edbba80261b3301a0e06060df7b942ed00
Contents?: true
Size: 845 Bytes
Versions: 50
Compression:
Stored size: 845 Bytes
Contents
package sh.calaba.instrumentationbackend.actions.l10n; import sh.calaba.instrumentationbackend.InstrumentationBackend; /** * Helper to access Android L10n files. * * @author Dominik Dary * */ public class L10nHelper { /** * get the translated value based on the current active locale. * * @param l10nKey The l10n key to use * @return The translated value. */ public static String getValue(String l10nKey) { int resourceId = InstrumentationBackend.solo .getCurrentActivity() .getResources() .getIdentifier(l10nKey, "string", InstrumentationBackend.solo.getCurrentActivity().getPackageName()); String localizedString = InstrumentationBackend.solo.getCurrentActivity().getResources().getString(resourceId); return localizedString; } }
Version data entries
50 entries across 50 versions & 2 rubygems