SIL.CoreImpl.SpellingHelper.RawDictionaryId C# (CSharp) Method

RawDictionaryId() private static method

private static RawDictionaryId ( int ws, ILgWritingSystemFactory wsf ) : string
ws int
wsf ILgWritingSystemFactory
return string
		private static string RawDictionaryId(int ws, ILgWritingSystemFactory wsf)
		{
			ILgWritingSystem wsEngine = wsf.get_EngineOrNull(ws);
			if (wsEngine == null)
				return null;
			string wsId = wsEngine.SpellCheckingId;
			if (String.IsNullOrEmpty(wsId))
			{
				// Our old spelling engine, Enchant, did not allow hyphen;
				// keeping that rule in case we switch again or there is some other good reason for it that we don't know.
				// Changing to underscore is OK since lang ID does not allow underscore.
				return wsEngine.Id.Replace('-', '_');
			}
			if (wsId == "<None>")
				return null;
			return wsId;
		}