public bool GetTranslation(string languageCode, string countryCode, out string translationLanguage, out string translationCountry)
        {
            EnsureNotDisposed();

            return(Interop.MLUGetTranslation(_handle, languageCode, countryCode, out translationLanguage, out translationCountry) != 0);
        }
        public bool TranslationsCodes(uint index, out string languageCode, out string countryCode)
        {
            EnsureNotDisposed();

            return(Interop.MLUTranslationsCodes(_handle, index, out languageCode, out countryCode) != 0);
        }
        public bool SetWide(string languageCode, string countryCode, string value)
        {
            EnsureNotDisposed();

            return(Interop.MLUSetWide(_handle, languageCode, countryCode, value) != 0);
        }
        public string GetWide(string languageCode, string countryCode)
        {
            EnsureNotDisposed();

            return(Interop.MLUGetWide(_handle, languageCode, countryCode));
        }
        public MultiLocalizedUnicode Duplicate()
        {
            EnsureNotDisposed();

            return(new MultiLocalizedUnicode(Interop.MLUDup(_handle), Context));
        }
 public static MultiLocalizedUnicode Create(Context context, uint nItems)
 {
     return(new MultiLocalizedUnicode(Interop.MLUAlloc(context?.Handle ?? IntPtr.Zero, nItems), context));
 }
예제 #7
0
 /// <summary>
 /// Frees the MLU handle.
 /// </summary>
 protected override bool ReleaseHandle()
 {
     Interop.MLUFree(handle);
     return(true);
 }
예제 #8
0
        /// <summary>
        /// Gets the ASCII (7 bit) entry for the given language and country code.
        /// </summary>
        /// <param name="languageCode">The ISO 639-1 language code.</param>
        /// <param name="countryCode">The ISO 3166-1 country code.</param>
        /// <returns>The entry, or null if not found.</returns>
        /// <exception cref="ObjectDisposedException">
        /// The multi-localized Unicode string has already been disposed.
        /// </exception>
        public string GetASCII(string languageCode, string countryCode)
        {
            EnsureNotClosed();

            return(Interop.MLUGetASCII(handle, languageCode, countryCode));
        }
예제 #9
0
        /// <summary>
        /// Sets an ASCII (7 bit) entry for the given language and country code.
        /// </summary>
        /// <param name="languageCode">The ISO 639-1 language code.</param>
        /// <param name="countryCode">The ISO 3166-1 country code.</param>
        /// <param name="value">The value to be set.</param>
        /// <returns>true if set successfully, otherwise false.</returns>
        /// <exception cref="ObjectDisposedException">
        /// The multi-localized Unicode string has already been disposed.
        /// </exception>
        public bool SetASCII(string languageCode, string countryCode, string value)
        {
            EnsureNotClosed();

            return(Interop.MLUSetAscii(handle, languageCode, countryCode, value) != 0);
        }