protected override void Save(Stream output) { foreach (var s in _doc.Descendants("string")) { s.Value = Translator.ConvertToFakeInternationalized(s.Value); } _doc.Save(output); }
protected override void Save(Stream output) { using (var w = new ResXResourceWriter(output)) { foreach (var entry in _resources) { w.AddResource( entry.Key.ToString(), Translator.ConvertToFakeInternationalized((string)entry.Value) ); } } }
protected override void Save(Stream output) { using (var writer = new StreamWriter(output)) { foreach (var pair in (from v in _values orderby v.Key select v)) { writer.WriteLine(@"""{0}"" = ""{1}"";", pair.Key, Translator.ConvertToFakeInternationalized(pair.Value) ); } } }
private static int ProcessStandardInput() { Console.OutputEncoding = Encoding.UTF8; while (true) { var line = Console.ReadLine(); if (line == null) { return(0); } Console.WriteLine(Translator.ConvertToFakeInternationalized(line)); } }
/// <summary> /// Converts a string to a pseudo-internationalized string. /// </summary> /// <remarks> /// Primarily for latin based languages. /// This will need updating to work with Eastern languages. /// Taken from: https://github.com/shanselman/Psuedoizer /// </remarks> /// <param name="s">The string to use as a base.</param> /// <returns>A longer and twiddled string.</returns> public static string ToPseudo(this string s) { return(Translator.ConvertToFakeInternationalized(s)); }