forked from I2P_Developers/i2p.i2p
Util: Add isRTL()
This commit is contained in:
@ -242,7 +242,7 @@ class SummaryRenderer {
|
||||
if (started > start && started < end) {
|
||||
// String legend = _t("Restart") + ' ' + sdf.format(new Date(started)) + " UTC " + event.getValue() + "\\l";
|
||||
String legend;
|
||||
if ("ar".equals(lang) || "fa".equals(lang) || "iw".equals(lang)) {
|
||||
if (Messages.isRTL(lang)) {
|
||||
// RTL languages
|
||||
legend = _t("Restart") + ' ' + sdf.format(new Date(started)) + " - " + event.getValue() + "\\l";
|
||||
} else {
|
||||
|
@ -153,6 +153,25 @@ public abstract class Translate {
|
||||
return lang;
|
||||
}
|
||||
|
||||
/**
|
||||
* Are we configured for a right-to-left language?
|
||||
* @return true for supported RTL languages
|
||||
* @since 0.9.46
|
||||
*/
|
||||
public static boolean isRTL(I2PAppContext ctx) {
|
||||
return isRTL(getLanguage(ctx));
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this a right-to-left language?
|
||||
* @param lang Two- or three-letter lower case
|
||||
* @return true for supported RTL languages
|
||||
* @since 0.9.46
|
||||
*/
|
||||
public static boolean isRTL(String lang) {
|
||||
return lang.equals("ar") || lang.equals("fa") || lang.equals("iw");
|
||||
}
|
||||
|
||||
/**
|
||||
* Two-letter upper case or ""
|
||||
* @return country in routerconsole.country property, else current locale
|
||||
|
Reference in New Issue
Block a user