Added MultilanguageResource Support 24/305824/4
authorAkshat Airan/Core S/W Group /SRI-Delhi/Engineer/Samsung Electronics <akshat.airan@samsung.com>
Thu, 8 Feb 2024 09:32:14 +0000 (15:02 +0530)
committerAkshat Airan/Core S/W Group /SRI-Delhi/Engineer/Samsung Electronics <akshat.airan@samsung.com>
Fri, 9 Feb 2024 03:36:34 +0000 (09:06 +0530)
Change-Id: If84b3f2854337fe208cf8124eca181d86fff656a
Signed-off-by: Akshat Airan/Core S/W Group /SRI-Delhi/Engineer/Samsung Electronics <akshat.airan@samsung.com>
19 files changed:
music-player/Common/MultiResourceManager.cs [new file with mode: 0644]
music-player/Common/Resources.cs
music-player/MusicPlayer.cs
music-player/TextResources/Resources.Designer.cs [new file with mode: 0644]
music-player/TextResources/Resources.en-US.resx [new file with mode: 0644]
music-player/TextResources/Resources.ko-KR.resx [new file with mode: 0644]
music-player/TextResources/Resources.resx [new file with mode: 0644]
music-player/Views/BaseContentView.cs
music-player/Views/BaseSubContentView.cs
music-player/Views/BaseView.cs
music-player/Views/PlaylistDetailView.cs
music-player/Views/PlaylistSelectorView.cs
music-player/Views/PlaylistView.cs
music-player/Views/SearchView.cs
music-player/Views/ViewManager.cs
music-player/music-player.csproj
music-player/res/themes/dark.xaml
music-player/res/themes/light.xaml
packaging/org.tizen.MusicPlayer-1.0.0.tpk

diff --git a/music-player/Common/MultiResourceManager.cs b/music-player/Common/MultiResourceManager.cs
new file mode 100644 (file)
index 0000000..eee8e26
--- /dev/null
@@ -0,0 +1,27 @@
+
+using System.Globalization;
+using System.Reflection;
+using System.Resources;
+
+namespace MusicPlayer.Common
+{
+    internal class MultiResourceManager : ResourceManager
+{
+        public MultiResourceManager(string baseName, Assembly assembly)
+            : base(baseName, assembly)
+        {
+        }
+
+        public override string GetString(string name)
+        {
+            return base.GetString(name)
+                ?? TextResources.Resources.ResourceManager.GetString(name);
+        }
+
+        public override string GetString(string name, CultureInfo culture)
+        {
+            return base.GetString(name, culture)
+                ?? TextResources.Resources.ResourceManager.GetString(name, culture);
+        }
+    }
+}
index 767665627bfef1781b849e06e18145eee3a8c6d6..9cc82b4f4a752b15b77ea3409c01fe65e670b22a 100755 (executable)
@@ -1,7 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
+
 namespace MusicPlayer.Common
 {
     public class Resources
index 8755a4bb0fadbfbd60fb7b811c47a56b890cfbfc..3da2f3b1d14218a4981d8c62955c66c909c4b790 100755 (executable)
@@ -3,6 +3,7 @@ using System.Text;
 using Tizen.NUI;
 using MusicPlayer.Views;
 using MusicPlayer.Common;
+using System.Globalization;
 
 namespace MusicPlayer
 {
@@ -15,7 +16,7 @@ namespace MusicPlayer
 
         protected override void OnCreate()
         {
-            Tizen.Log.Info(AppConstants.LogTag, "OnCreate statrted");
+            Tizen.Log.Info(AppConstants.LogTag, "OnCreate started");
             base.OnCreate();
 
             //Initlize NUISynchronizationContext
@@ -23,6 +24,7 @@ namespace MusicPlayer
 
             Window window = Window.Instance;
             window.Maximize(true);
+            SetupLanguage();
             window.BackgroundColor = Color.White;
             Size2D size = window.Size;
             Tizen.Log.Info(AppConstants.LogTag, "Window Size: " + size.Width + "x" + size.Height);
@@ -49,6 +51,27 @@ namespace MusicPlayer
             Environment.Exit(1);
         }
 
+        private void SetupLanguage()
+        {
+            void SetLanguage()
+            {
+                try
+                {
+                    string language = Tizen.System.SystemSettings.LocaleLanguage.Replace("_", "-");
+                    var culture = CultureInfo.CreateSpecificCulture(language);
+                    CultureInfo.CurrentCulture = culture;
+                    TextResources.Resources.Culture = culture;
+                }
+                catch (Exception e)
+                {
+                    Tizen.Log.Debug(AppConstants.LogTag, "Setting Language failed" + e.Message);
+                }
+            }
+
+            MultilingualResourceManager = new MultiResourceManager("music-player.TextResources.Resources", typeof(Resources).Assembly);
+            Tizen.System.SystemSettings.LocaleLanguageChanged += (s, e) => SetLanguage();
+            SetLanguage();
+        }
         static void Main(string[] args)
         {
             Tizen.Log.Info(AppConstants.LogTag, "Main statrted");
diff --git a/music-player/TextResources/Resources.Designer.cs b/music-player/TextResources/Resources.Designer.cs
new file mode 100644 (file)
index 0000000..987eddb
--- /dev/null
@@ -0,0 +1,270 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MusicPlayer.TextResources {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("music-player.TextResources.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Add to playlist.
+        /// </summary>
+        internal static string ADD_TO_PLAYLIST {
+            get {
+                return ResourceManager.GetString("ADD_TO_PLAYLIST", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Add.
+        /// </summary>
+        internal static string IDS_ADD {
+            get {
+                return ResourceManager.GetString("IDS_ADD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Add playlist name.
+        /// </summary>
+        internal static string IDS_ADD_PLAYLIST_NAME {
+            get {
+                return ResourceManager.GetString("IDS_ADD_PLAYLIST_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Albums.
+        /// </summary>
+        internal static string IDS_ALBUMS {
+            get {
+                return ResourceManager.GetString("IDS_ALBUMS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Artists.
+        /// </summary>
+        internal static string IDS_ARTISTS {
+            get {
+                return ResourceManager.GetString("IDS_ARTISTS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Cancel.
+        /// </summary>
+        internal static string IDS_CANCEL {
+            get {
+                return ResourceManager.GetString("IDS_CANCEL", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Can&apos;t enter more than 64 characters..
+        /// </summary>
+        internal static string IDS_CANT_ENTER_MORE_CHAR {
+            get {
+                return ResourceManager.GetString("IDS_CANT_ENTER_MORE_CHAR", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Create.
+        /// </summary>
+        internal static string IDS_CREATE {
+            get {
+                return ResourceManager.GetString("IDS_CREATE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Create playlist.
+        /// </summary>
+        internal static string IDS_CREATE_PLAYLIST {
+            get {
+                return ResourceManager.GetString("IDS_CREATE_PLAYLIST", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Delete.
+        /// </summary>
+        internal static string IDS_DELETE {
+            get {
+                return ResourceManager.GetString("IDS_DELETE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Enter Playlist Name.
+        /// </summary>
+        internal static string IDS_ENTER_PLAYLIST_NAME {
+            get {
+                return ResourceManager.GetString("IDS_ENTER_PLAYLIST_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Music.
+        /// </summary>
+        internal static string IDS_MUSIC {
+            get {
+                return ResourceManager.GetString("IDS_MUSIC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to No items in folder.
+        /// </summary>
+        internal static string IDS_NO_ITEMS_IN_FOLDER {
+            get {
+                return ResourceManager.GetString("IDS_NO_ITEMS_IN_FOLDER", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to No playlists available.
+        /// </summary>
+        internal static string IDS_NO_PLAYLIST_AVAIL {
+            get {
+                return ResourceManager.GetString("IDS_NO_PLAYLIST_AVAIL", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to No results found.
+        /// </summary>
+        internal static string IDS_NO_RESULT_FOUND {
+            get {
+                return ResourceManager.GetString("IDS_NO_RESULT_FOUND", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Playlist name already in use..
+        /// </summary>
+        internal static string IDS_PLAYLIST_NAME_USED {
+            get {
+                return ResourceManager.GetString("IDS_PLAYLIST_NAME_USED", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Playlists.
+        /// </summary>
+        internal static string IDS_PLAYLISTS {
+            get {
+                return ResourceManager.GetString("IDS_PLAYLISTS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Remove.
+        /// </summary>
+        internal static string IDS_REMOVE {
+            get {
+                return ResourceManager.GetString("IDS_REMOVE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Search.
+        /// </summary>
+        internal static string IDS_SEARCH {
+            get {
+                return ResourceManager.GetString("IDS_SEARCH", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Search music.
+        /// </summary>
+        internal static string IDS_SEARCH_MUSIC {
+            get {
+                return ResourceManager.GetString("IDS_SEARCH_MUSIC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Share.
+        /// </summary>
+        internal static string IDS_SHARE {
+            get {
+                return ResourceManager.GetString("IDS_SHARE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Tracks.
+        /// </summary>
+        internal static string IDS_TRACK {
+            get {
+                return ResourceManager.GetString("IDS_TRACK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Type Here.
+        /// </summary>
+        internal static string IDS_TYPE_HERE {
+            get {
+                return ResourceManager.GetString("IDS_TYPE_HERE", resourceCulture);
+            }
+        }
+    }
+}
diff --git a/music-player/TextResources/Resources.en-US.resx b/music-player/TextResources/Resources.en-US.resx
new file mode 100644 (file)
index 0000000..6ab452d
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="ADD_TO_PLAYLIST" xml:space="preserve">
+    <value>Add to playlist</value>
+  </data>
+  <data name="IDS_ADD" xml:space="preserve">
+    <value>Add</value>
+  </data>
+  <data name="IDS_ADD_PLAYLIST_NAME" xml:space="preserve">
+    <value>Add playlist name</value>
+  </data>
+  <data name="IDS_ALBUMS" xml:space="preserve">
+    <value>Albums</value>
+  </data>
+  <data name="IDS_ARTISTS" xml:space="preserve">
+    <value>Artists</value>
+  </data>
+  <data name="IDS_CANCEL" xml:space="preserve">
+    <value>Cancel</value>
+  </data>
+  <data name="IDS_CANT_ENTER_MORE_CHAR" xml:space="preserve">
+    <value>Can't enter more than 64 characters.</value>
+  </data>
+  <data name="IDS_CREATE" xml:space="preserve">
+    <value>Create</value>
+  </data>
+  <data name="IDS_CREATE_PLAYLIST" xml:space="preserve">
+    <value>Create playlist</value>
+  </data>
+  <data name="IDS_DELETE" xml:space="preserve">
+    <value>Delete</value>
+  </data>
+  <data name="IDS_ENTER_PLAYLIST_NAME" xml:space="preserve">
+    <value>Enter Playlist Name</value>
+  </data>
+  <data name="IDS_MUSIC" xml:space="preserve">
+    <value>Music</value>
+  </data>
+  <data name="IDS_NO_ITEMS_IN_FOLDER" xml:space="preserve">
+    <value>No items in folder</value>
+  </data>
+  <data name="IDS_NO_PLAYLIST_AVAIL" xml:space="preserve">
+    <value>No playlists available</value>
+  </data>
+  <data name="IDS_NO_RESULT_FOUND" xml:space="preserve">
+    <value>No results found</value>
+  </data>
+  <data name="IDS_PLAYLISTS" xml:space="preserve">
+    <value>Playlists</value>
+  </data>
+  <data name="IDS_PLAYLIST_NAME_USED" xml:space="preserve">
+    <value>Playlist name already in use.</value>
+  </data>
+  <data name="IDS_REMOVE" xml:space="preserve">
+    <value>Remove</value>
+  </data>
+  <data name="IDS_SEARCH" xml:space="preserve">
+    <value>Search</value>
+  </data>
+  <data name="IDS_SEARCH_MUSIC" xml:space="preserve">
+    <value>Search music</value>
+  </data>
+  <data name="IDS_SHARE" xml:space="preserve">
+    <value>Share</value>
+  </data>
+  <data name="IDS_TRACK" xml:space="preserve">
+    <value>Tracks</value>
+  </data>
+  <data name="IDS_TYPE_HERE" xml:space="preserve">
+    <value>Type Here</value>
+  </data>
+</root>
\ No newline at end of file
diff --git a/music-player/TextResources/Resources.ko-KR.resx b/music-player/TextResources/Resources.ko-KR.resx
new file mode 100644 (file)
index 0000000..e16836b
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="ADD_TO_PLAYLIST" xml:space="preserve">
+    <value>재생 목록에 추가</value>
+  </data>
+  <data name="IDS_ADD" xml:space="preserve">
+    <value>더하다</value>
+  </data>
+  <data name="IDS_ADD_PLAYLIST_NAME" xml:space="preserve">
+    <value>재생 목록 이름 추가</value>
+  </data>
+  <data name="IDS_ALBUMS" xml:space="preserve">
+    <value>앨범</value>
+  </data>
+  <data name="IDS_ARTISTS" xml:space="preserve">
+    <value>예술가</value>
+  </data>
+  <data name="IDS_CANCEL" xml:space="preserve">
+    <value>취소</value>
+  </data>
+  <data name="IDS_CANT_ENTER_MORE_CHAR" xml:space="preserve">
+    <value>64자를 초과하여 입력할 수 없습니다.</value>
+  </data>
+  <data name="IDS_CREATE" xml:space="preserve">
+    <value>창조하다</value>
+  </data>
+  <data name="IDS_CREATE_PLAYLIST" xml:space="preserve">
+    <value>재생 목록 만들기</value>
+  </data>
+  <data name="IDS_DELETE" xml:space="preserve">
+    <value>삭제하다</value>
+  </data>
+  <data name="IDS_ENTER_PLAYLIST_NAME" xml:space="preserve">
+    <value>재생 목록 이름 입력</value>
+  </data>
+  <data name="IDS_MUSIC" xml:space="preserve">
+    <value>음악</value>
+  </data>
+  <data name="IDS_NO_ITEMS_IN_FOLDER" xml:space="preserve">
+    <value>폴더에 항목이 없습니다.</value>
+  </data>
+  <data name="IDS_NO_PLAYLIST_AVAIL" xml:space="preserve">
+    <value>사용 가능한 재생 목록이 없습니다</value>
+  </data>
+  <data name="IDS_NO_RESULT_FOUND" xml:space="preserve">
+    <value>결과를 찾을 수 없습니다.</value>
+  </data>
+  <data name="IDS_PLAYLISTS" xml:space="preserve">
+    <value>재생 목록</value>
+  </data>
+  <data name="IDS_PLAYLIST_NAME_USED" xml:space="preserve">
+    <value>이미 사용 중인 재생 목록 이름입니다.</value>
+  </data>
+  <data name="IDS_REMOVE" xml:space="preserve">
+    <value>제거하다</value>
+  </data>
+  <data name="IDS_SEARCH" xml:space="preserve">
+    <value>검색</value>
+  </data>
+  <data name="IDS_SEARCH_MUSIC" xml:space="preserve">
+    <value>음악 검색</value>
+  </data>
+  <data name="IDS_SHARE" xml:space="preserve">
+    <value>공유</value>
+  </data>
+  <data name="IDS_TRACK" xml:space="preserve">
+    <value>트랙</value>
+  </data>
+  <data name="IDS_TYPE_HERE" xml:space="preserve">
+    <value>여기에 입력하십시오</value>
+  </data>
+</root>
\ No newline at end of file
diff --git a/music-player/TextResources/Resources.resx b/music-player/TextResources/Resources.resx
new file mode 100644 (file)
index 0000000..6ab452d
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="ADD_TO_PLAYLIST" xml:space="preserve">
+    <value>Add to playlist</value>
+  </data>
+  <data name="IDS_ADD" xml:space="preserve">
+    <value>Add</value>
+  </data>
+  <data name="IDS_ADD_PLAYLIST_NAME" xml:space="preserve">
+    <value>Add playlist name</value>
+  </data>
+  <data name="IDS_ALBUMS" xml:space="preserve">
+    <value>Albums</value>
+  </data>
+  <data name="IDS_ARTISTS" xml:space="preserve">
+    <value>Artists</value>
+  </data>
+  <data name="IDS_CANCEL" xml:space="preserve">
+    <value>Cancel</value>
+  </data>
+  <data name="IDS_CANT_ENTER_MORE_CHAR" xml:space="preserve">
+    <value>Can't enter more than 64 characters.</value>
+  </data>
+  <data name="IDS_CREATE" xml:space="preserve">
+    <value>Create</value>
+  </data>
+  <data name="IDS_CREATE_PLAYLIST" xml:space="preserve">
+    <value>Create playlist</value>
+  </data>
+  <data name="IDS_DELETE" xml:space="preserve">
+    <value>Delete</value>
+  </data>
+  <data name="IDS_ENTER_PLAYLIST_NAME" xml:space="preserve">
+    <value>Enter Playlist Name</value>
+  </data>
+  <data name="IDS_MUSIC" xml:space="preserve">
+    <value>Music</value>
+  </data>
+  <data name="IDS_NO_ITEMS_IN_FOLDER" xml:space="preserve">
+    <value>No items in folder</value>
+  </data>
+  <data name="IDS_NO_PLAYLIST_AVAIL" xml:space="preserve">
+    <value>No playlists available</value>
+  </data>
+  <data name="IDS_NO_RESULT_FOUND" xml:space="preserve">
+    <value>No results found</value>
+  </data>
+  <data name="IDS_PLAYLISTS" xml:space="preserve">
+    <value>Playlists</value>
+  </data>
+  <data name="IDS_PLAYLIST_NAME_USED" xml:space="preserve">
+    <value>Playlist name already in use.</value>
+  </data>
+  <data name="IDS_REMOVE" xml:space="preserve">
+    <value>Remove</value>
+  </data>
+  <data name="IDS_SEARCH" xml:space="preserve">
+    <value>Search</value>
+  </data>
+  <data name="IDS_SEARCH_MUSIC" xml:space="preserve">
+    <value>Search music</value>
+  </data>
+  <data name="IDS_SHARE" xml:space="preserve">
+    <value>Share</value>
+  </data>
+  <data name="IDS_TRACK" xml:space="preserve">
+    <value>Tracks</value>
+  </data>
+  <data name="IDS_TYPE_HERE" xml:space="preserve">
+    <value>Type Here</value>
+  </data>
+</root>
\ No newline at end of file
index de345feb30bdac1a3ec39e2b791f30f08e29bdc5..618deba348ccd5159266f5d138b85ac1b7f6eea7 100755 (executable)
@@ -155,7 +155,7 @@ namespace MusicPlayer.Views
                 {
                     StyleName = "TitleText",
                     Size2D = new Size2D(234, 36).SpToPx(),
-                    Text = "No items in folder",
+                    TranslatableText = "IDS_NO_ITEMS_IN_FOLDER",
                     PixelSize = 24.SpToPx(),
                     FontFamily = "BreezeSans",
                     HorizontalAlignment = HorizontalAlignment.Center,
index e8a38f6c7d25f42f154a6d659c09d81794f3ee38..0b409de4face1a2b432b8269382b81da4998dad7 100755 (executable)
@@ -152,7 +152,7 @@ namespace MusicPlayer.Views
                 {
                     StyleName = "TitleText",
                     Size2D = new Size2D(234, 36).SpToPx(),
-                    Text = "No items in folder",
+                    TranslatableText = "IDS_NO_ITEMS_IN_FOLDER",
                     PixelSize = 24.SpToPx(),
                     FontFamily = "BreezeSans",
                     HorizontalAlignment = HorizontalAlignment.Center,
index c35110441bd225b8a3fa03ad5d9df9e4891d6c78..8cb1db03f8306a34032faf74ec0859bdb9dcc6e2 100755 (executable)
@@ -26,6 +26,10 @@ namespace MusicPlayer.Views
             "Tracks",
             "Albums",
             "Artists",
+            //"IDS_PLAYLIST",
+            //"IDS_TRACK",
+            //"IDS_ALBUMS",
+            //"IDS_ARTISTS",
         };
         public BaseView() : base()
         {
@@ -55,7 +59,6 @@ namespace MusicPlayer.Views
             {
                 StyleName = "PageLabel",
                 ThemeChangeSensitive = true,
-                Text = "Music",
                 PixelSize = 40.SpToPx(),
                 FontFamily = "BreezeSans",
                 HorizontalAlignment = HorizontalAlignment.Begin,
@@ -64,7 +67,7 @@ namespace MusicPlayer.Views
                 FontStyle = UIFontStyles.NormalLight,
             };
             topView.Add(titleLabel);
-            titleLabel.SetBinding(TextLabel.TextProperty, "Title");
+            titleLabel.SetBinding(TextLabel.TranslatableTextProperty, "Title");
             RelativeLayout.SetLeftTarget(titleLabel, topView);
             RelativeLayout.SetLeftRelativeOffset(titleLabel, 0.0f);
             RelativeLayout.SetRightTarget(titleLabel, topView);
@@ -110,8 +113,8 @@ namespace MusicPlayer.Views
 
         public string Title
         {
-            get => titleLabel.Text;
-            set { titleLabel.Text = value;}
+            get => titleLabel.TranslatableText;
+            set { titleLabel.TranslatableText = value;}
         }
 
         public bool BackButton
@@ -223,7 +226,7 @@ namespace MusicPlayer.Views
             else
             {
                 BackButton = false;
-                Title = "Music";
+                Title = "IDS_MUSIC";
             }
             contentView.Add(view);
             baseContentView = view;
@@ -299,7 +302,7 @@ namespace MusicPlayer.Views
             if (baseContentView != null)
             {
                 BackButton = false;
-                Title = "Music";
+                Title = "IDS_Music";
                 baseContentView.RemoveSubContentView();
             }
         }
index ba5966ef9197cce65140fa2ffd8634f5580c52f2..4834618578da86634a297c22cf4c621a4686cba3 100755 (executable)
@@ -71,18 +71,18 @@ namespace MusicPlayer.Views
             List<MenuItem> menuItemList = new List<MenuItem>();
             if (isTrackListEmpty == false)
             {
-                var share = new MenuItem("MenuItems") { Text = "Share" };
+                var share = new MenuItem("MenuItems") { TranslatableText = "IDS_SHARE" };
                 share.Clicked += OnShareClick;
                 menuItemList.Add(share);
             }
             if (viewModel.IsDefaultPlaylist == false)
             {
-                var add = new MenuItem("MenuItems") { Text = "Add" };
+                var add = new MenuItem("MenuItems") { TranslatableText = "IDS_ADD" };
                 add.Clicked += OnAddClick;
                 menuItemList.Add(add);
                 if (isTrackListEmpty == false)
                 {
-                    var delete = new MenuItem("MenuItems") { Text = "Remove" };
+                    var delete = new MenuItem("MenuItems") { TranslatableText = "IDS_REMOVE" };
                     delete.Clicked += OnDeleteClick;
                     menuItemList.Add(delete);
                 }
index c9b3dcc41f1fb41c022bec3ee7b92918696ff1de..609f1074382272e96bece3c0a84f545e279612c7 100755 (executable)
@@ -64,7 +64,7 @@ namespace MusicPlayer.Views
                     HorizontalAlignment = HorizontalAlignment.Begin,
                     VerticalAlignment = VerticalAlignment.Top,
                 },
-                TitleContent = CreateAlertDialogTitle("Add to playlist"),
+                TitleContent = CreateAlertDialogTitle("IDS_ADD_TO_PLAYLIST"),
                 Content = selectPlaylistContentArea,
                 ActionContent = selectPlaylistActionArea,
             };
@@ -84,7 +84,7 @@ namespace MusicPlayer.Views
                 PixelSize = 40.SpToPx(),
                 FontFamily = "BreezeSans",
                 FontStyle = UIFontStyles.AllNormal,
-                Text = titleText,
+                TranslatableText = titleText,
                 WidthSpecification = LayoutParamPolicies.MatchParent,
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
@@ -290,7 +290,7 @@ namespace MusicPlayer.Views
                 WidthSpecification = LayoutParamPolicies.MatchParent,
                 HeightSpecification = 108.SpToPx(),
                 PixelSize = 32.SpToPx(),
-                Text = "No playlists available",
+                TranslatableText = "IDS_NO_PLAYLIST_AVAIL",
                 HorizontalAlignment = HorizontalAlignment.Begin,
                 VerticalAlignment = VerticalAlignment.Center,
                 FontFamily = "BreezeSans",
@@ -316,7 +316,7 @@ namespace MusicPlayer.Views
             selectPlaylistCancelButton = new Button()
             {
                 Size2D = new Size2D(336, 96).SpToPx(),
-                Text = "Cancel",
+                TranslatableText = "IDS_CANCEL",
                 PointSize = 16.SpToPx(),
             };
             selectPlaylistActionArea.Add(selectPlaylistCancelButton);
@@ -359,7 +359,7 @@ namespace MusicPlayer.Views
                 WidthSpecification = LayoutParamPolicies.MatchParent,
                 HeightSpecification = 48.SpToPx(),
                 PixelSize = 32.SpToPx(),
-                Text = "Add playlist name.",
+                TranslatableText = "IDS_ADD_PLAYLIST_NAME",
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
                 FontFamily = "BreezeSans",
@@ -382,7 +382,7 @@ namespace MusicPlayer.Views
                 WidthSpecification = LayoutParamPolicies.MatchParent,
                 HeightSpecification = 36.SpToPx(),
                 PixelSize = 24.SpToPx(),
-                Text = "Can't enter more than 64 characters.",
+                TranslatableText = "IDS_CANT_ENTER_MORE_CHAR",
                 HorizontalAlignment = HorizontalAlignment.Begin,
                 VerticalAlignment = VerticalAlignment.Center,
                 FontFamily = "BreezeSans",
@@ -453,7 +453,7 @@ namespace MusicPlayer.Views
             if (searchText.Length > 64)
             {
                 ShowInfoMessage("Maximum number of characters reached");
-                underText.Text = "Can't enter more than 64 characters.";
+                underText.TranslatableText = "IDS_CANT_ENTER_MORE_CHAR";
                 textField.Text = searchText.Substring(0, 63);
             }
         }
@@ -486,7 +486,7 @@ namespace MusicPlayer.Views
             createPlaylistCreateButton = new Button()
             {
                 Size2D = new Size2D(336, 96).SpToPx(),
-                Text = "Create",
+                TranslatableText = "IDS_CREATE",
                 PointSize = 16.SpToPx(),
             };
             createPlaylistCreateButton.TextLabel.FontStyle = UIFontStyles.AllNormal;
@@ -525,7 +525,7 @@ namespace MusicPlayer.Views
             if (viewModel.CreatePlaylist(textField.Text) == false)
             {
                 ShowInfoMessage("Playlist name already in use.");
-                underText.Text = "Playlist name already in use.";
+                underText.TranslatableText = "IDS_PLAYLIST_NAME_USED";
             }
         }
 
index d0688ba9fd2ef7edf6512850fb05894c7687213b..2b96dfc528686157695baf2f33e3d1157e5b83e4 100755 (executable)
@@ -91,7 +91,7 @@ namespace MusicPlayer.Views
 
         protected override void UpdateContentMoreButtonItems(Menu moreMenu)
         {
-            var delete = new MenuItem("MenuItems"){ Text = "Delete", };
+            var delete = new MenuItem("MenuItems"){ TranslatableText = "IDS_DELETE", };
             delete.Clicked += OnDeleteClick;
             moreMenu.Items = new MenuItem[] { delete };
         }
@@ -124,7 +124,7 @@ namespace MusicPlayer.Views
                 PixelSize = 40.SpToPx(),
                 FontFamily = "BreezeSans",
                 FontStyle = UIFontStyles.AllNormal,
-                Text = "Create playlist",
+                TranslatableText = "IDS_CREATE_PLAYLIST",
                 WidthSpecification = LayoutParamPolicies.MatchParent,
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
@@ -142,7 +142,7 @@ namespace MusicPlayer.Views
                 PixelSize = 32.SpToPx(),
                 FontFamily = "BreezeSans",
                 FontStyle = UIFontStyles.NormalLight,
-                Text = "Add playlist name",
+                TranslatableText = "IDS_ADD_PLAYLIST_NAME",
                 WidthSpecification = LayoutParamPolicies.MatchParent,
                 HeightSpecification = 48.SpToPx(),
                 HorizontalAlignment = HorizontalAlignment.Center,
@@ -155,7 +155,7 @@ namespace MusicPlayer.Views
             TextField inputTextField = new TextField()
             {
                 Name = "AlertDialogInputField",
-                PlaceholderText = "Enter Playlist Name",
+                TranslatablePlaceholderText = "IDS_ENTER_PLAYLIST_NAME",
                 Text = DefaultPlaylistName,
                 HorizontalAlignment = HorizontalAlignment.Begin,
                 PixelSize = 32.SpToPx(),
@@ -224,7 +224,7 @@ namespace MusicPlayer.Views
             {
                 Size2D = new Size2D(336, 96).SpToPx(),
                 Name = "AlertDialogCreateButton",
-                Text = "Create",
+                TranslatableText = "IDS_CREATE",
                 PointSize = 16.SpToPx(),
             };
             return createButton;
index 0a4d99901eef454cc4b3f9806fd5a9ca0f5ae86c..ff9fe6dac4c18db0871afd9f834ed0e7c5bbec8d 100755 (executable)
@@ -104,7 +104,7 @@ namespace MusicPlayer.Views
                 StyleName = "PageLabel",
                 ThemeChangeSensitive = true,
                 HeightSpecification = 48.SpToPx(),
-                Text = "Search",
+                TranslatableText = "IDS_SEARCH",
                 PixelSize = 36.SpToPx(),
                 FontFamily = "BreezeSans",
                 Margin = new Extents(0, 32, 0, 0).SpToPx(),
@@ -161,8 +161,8 @@ namespace MusicPlayer.Views
                 HeightSpecification = 60.SpToPx(),
                 BackgroundColor = Color.Transparent,
                 PixelSize = 32.SpToPx(),
-                PlaceholderText = "Type Here",
-                PlaceholderTextFocused = "Search music",
+                TranslatablePlaceholderText = "IDS_TYPE_HERE",
+                TranslatablePlaceholderTextFocused = "IDS_SEARCH_MUSIC",
                 HorizontalAlignment = HorizontalAlignment.Begin,
                 VerticalAlignment = VerticalAlignment.Center,
             };
@@ -218,7 +218,7 @@ namespace MusicPlayer.Views
                 {
                     ListItemLayout layout = new ListItemLayout();
                     layout.Icon.SetBinding(ImageView.ResourceUrlProperty, "Thumbnail");
-                    layout.TitleLabel.SetBinding(TextLabel.TextProperty, "Title");
+                    layout.TitleLabel.SetBinding(TextLabel.TranslatableTextProperty, "Title");
                     layout.SubtitleLabel.SetBinding(TextLabel.TextProperty, "SubTitle");
                     return layout;
                 }),
@@ -320,7 +320,7 @@ namespace MusicPlayer.Views
                         StyleName = "TitleText",
                         WidthSpecification = LayoutParamPolicies.MatchParent,
                         HeightSpecification = 36.SpToPx(),
-                        Text = "No results found",
+                        TranslatableText = "IDS_NO_RESULT_FOUND",
                         PixelSize = 24.SpToPx(),
                         FontFamily = "BreezeSans",
                         HorizontalAlignment = HorizontalAlignment.Center,
index a17cf2bab1975ce43918cf421c6b4ddabab3c72c..c75df945a068f849db34e0af2d85b0a876ac0d97 100755 (executable)
@@ -14,7 +14,7 @@ namespace MusicPlayer.Views
     {
         private readonly ViewLibrary viewLibrary;
         private View rootView;
-        private BaseView baseView;
+        private BaseView baseView;      
         private static readonly  string[] TabNames = new string[]
         {
             "Playlists",
@@ -22,7 +22,6 @@ namespace MusicPlayer.Views
             "Albums",
             "Artists",
         };
-
         public ViewManager(Window win)
         {
             viewLibrary = new ViewLibrary();
@@ -86,7 +85,7 @@ namespace MusicPlayer.Views
             rootView = new View()
             {
                 StyleName = "AppBackground",
-                Size = new Size(win.Size),
+                Size = new Size(win.Size),               
                 ThemeChangeSensitive = true,
                 Layout = new FlexLayout()
                 {
@@ -114,7 +113,7 @@ namespace MusicPlayer.Views
         {
             baseView = new BaseView()
             {
-                Title = "Music",
+                Title = "IDS_MUSIC",
                 MoreButton = true,
                 SearchButton = true,
             };
index 24fcfbf1166de8c6c31fcb3f05fccb03ce6922e9..e1521bc9f194a82a01cd0fa3d57e5a2b1f719300 100755 (executable)
     <PackageReference Include="Tizen.NET.Sdk" Version="1.2.0" />\r
   </ItemGroup>\r
 \r
+  <ItemGroup>\r
+    <Compile Update="TextResources\Resources.Designer.cs">\r
+      <DesignTime>True</DesignTime>\r
+      <AutoGen>True</AutoGen>\r
+      <DependentUpon>Resources.resx</DependentUpon>\r
+    </Compile>\r
+  </ItemGroup>\r
+\r
+  <ItemGroup>\r
+    <EmbeddedResource Update="TextResources\Resources.resx">\r
+      <Generator>ResXFileCodeGenerator</Generator>\r
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>\r
+    </EmbeddedResource>\r
+  </ItemGroup>\r
+\r
 </Project>\r
index e97574c7be10142c6b643f3461f841a614063369..aadc82bc51b3de50a14eeaf52305dd7ea118f4f6 100755 (executable)
@@ -182,7 +182,7 @@ Id="DarkTheme">
   <c:ButtonStyle x:Key="CancelButton" Size="336sp, 96sp" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" >
     <c:ButtonStyle.BackgroundImage>*Resource*/images/dark/cancel_button_bg.png</c:ButtonStyle.BackgroundImage>
     <c:ButtonStyle.Text>
-      <TextLabelStyle TextColor="#FFFFFF" FontFamily="BreezeSans" PixelSize="32sp" Text="Cancel"/>
+      <TextLabelStyle TextColor="#FFFFFF" FontFamily="BreezeSans" PixelSize="32sp" TranslatableText="IDS_CANCEL"/>
     </c:ButtonStyle.Text>
   </c:ButtonStyle>
 
index be03722bd6c611f65b55465a41e929a32d3f5926..f4ef63c9c869b495e5a4fe2c81cb3df2c627f2e6 100755 (executable)
@@ -182,7 +182,7 @@ Id="LightTheme">
   <c:ButtonStyle x:Key="CancelButton" Size="336sp, 96sp" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" >
     <c:ButtonStyle.BackgroundImage>*Resource*/images/light/cancel_button_bg.png</c:ButtonStyle.BackgroundImage>
     <c:ButtonStyle.Text>
-      <TextLabelStyle TextColor="#000C2B" FontFamily="BreezeSans" PixelSize="32sp" Text="Cancel"/>
+      <TextLabelStyle TextColor="#000C2B" FontFamily="BreezeSans" PixelSize="32sp" TranslatableText="IDS_CANCEL"/>
     </c:ButtonStyle.Text>
   </c:ButtonStyle>
 
index f40b0a87cc0eda5108a1bed51df788bf32f19c42..246a10d12708e786245806ab63e3922e51fae392 100755 (executable)
Binary files a/packaging/org.tizen.MusicPlayer-1.0.0.tpk and b/packaging/org.tizen.MusicPlayer-1.0.0.tpk differ