public void SetText() { var locale = L20n.CurrentLocale; var text = string.Format("{0} ({1})", L20n.Translate(locale), locale); GetComponent <Text> ().text = text; }
private void UpdateText() { if (identifier == "") { return; } Font font = L20n.CurrentFont; if (useCustomFonts) { Font f = null; if (fonts.GetAllResources().TryGetValue(L20n.CurrentLocale, out f)) { font = f; } else if (defaultFont != null) { font = defaultFont; } } if (useVariables) { var text = L20n.Translate(identifier, variables.GetKeys(), variables.GetValues()); SetText(text, font); } else { var text = L20n.Translate(identifier); SetText(text, font); } }
public override void Collect(L20nCore.External.InfoCollector info) { switch (m_Gender) { case Gender.Default: info.Add("gender", "default"); info.Add("name", () => L20n.Translate("neutral_user_name")); break; case Gender.Feminine: info.Add("gender", "feminine"); info.Add("name", () => L20n.Translate("feminine_user_name")); break; case Gender.Masculine: info.Add("gender", "masculine"); info.Add("name", () => L20n.Translate("masculine_user_name")); break; } }