public void TranslatePluralizationTest() { string[] expectedStrings = { "let", //-10 "let", //-9 "let", //-8 "let", //-7 "let", //-6 "let", //-5 "roky", //-4 "roky", //-3 "roky", //-2 "rok", //-1 "let", //0 "rok", //1 "roky", //2 "roky", //3 "roky", //4 "let", //5 "let", //6 "let", //7 "let", //8 "let", //9 "let", //10 }; for (var i = 0; i < 21; i++) { var pluralizationNum = i - 10; var lsA = m_localizationManager.TranslatePluralization( LocTranslationSource.Auto, "klíč-stringu", pluralizationNum, null, "slovniky" ); Assert.AreEqual(expectedStrings[i], lsA); } }
public LocalizedString TranslatePluralization(string text, string scope, LocTranslationSource translationSource, int number) { var requestCulture = GetRequestCulture(); return(m_localizationManager.TranslatePluralization(translationSource, requestCulture, scope, text, number)); }
public LocalizedString TranslatePluralization( LocTranslationSource translationSource, string text, int number, CultureInfo cultureInfo = null, string scope = null ) { return(m_localizationManager.TranslatePluralization(translationSource, text, number, cultureInfo, scope)); }