--- /dev/null
+
+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);
+ }
+ }
+}
-using System;
-using System.Collections.Generic;
-using System.Text;
-
+
namespace MusicPlayer.Common
{
public class Resources
using Tizen.NUI;
using MusicPlayer.Views;
using MusicPlayer.Common;
+using System.Globalization;
namespace MusicPlayer
{
protected override void OnCreate()
{
- Tizen.Log.Info(AppConstants.LogTag, "OnCreate statrted");
+ Tizen.Log.Info(AppConstants.LogTag, "OnCreate started");
base.OnCreate();
//Initlize NUISynchronizationContext
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);
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");
--- /dev/null
+//------------------------------------------------------------------------------
+// <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'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);
+ }
+ }
+ }
+}
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?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
{
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,
{
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,
"Tracks",
"Albums",
"Artists",
+ //"IDS_PLAYLIST",
+ //"IDS_TRACK",
+ //"IDS_ALBUMS",
+ //"IDS_ARTISTS",
};
public BaseView() : base()
{
{
StyleName = "PageLabel",
ThemeChangeSensitive = true,
- Text = "Music",
PixelSize = 40.SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
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);
public string Title
{
- get => titleLabel.Text;
- set { titleLabel.Text = value;}
+ get => titleLabel.TranslatableText;
+ set { titleLabel.TranslatableText = value;}
}
public bool BackButton
else
{
BackButton = false;
- Title = "Music";
+ Title = "IDS_MUSIC";
}
contentView.Add(view);
baseContentView = view;
if (baseContentView != null)
{
BackButton = false;
- Title = "Music";
+ Title = "IDS_Music";
baseContentView.RemoveSubContentView();
}
}
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);
}
HorizontalAlignment = HorizontalAlignment.Begin,
VerticalAlignment = VerticalAlignment.Top,
},
- TitleContent = CreateAlertDialogTitle("Add to playlist"),
+ TitleContent = CreateAlertDialogTitle("IDS_ADD_TO_PLAYLIST"),
Content = selectPlaylistContentArea,
ActionContent = selectPlaylistActionArea,
};
PixelSize = 40.SpToPx(),
FontFamily = "BreezeSans",
FontStyle = UIFontStyles.AllNormal,
- Text = titleText,
+ TranslatableText = titleText,
WidthSpecification = LayoutParamPolicies.MatchParent,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
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",
selectPlaylistCancelButton = new Button()
{
Size2D = new Size2D(336, 96).SpToPx(),
- Text = "Cancel",
+ TranslatableText = "IDS_CANCEL",
PointSize = 16.SpToPx(),
};
selectPlaylistActionArea.Add(selectPlaylistCancelButton);
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",
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",
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);
}
}
createPlaylistCreateButton = new Button()
{
Size2D = new Size2D(336, 96).SpToPx(),
- Text = "Create",
+ TranslatableText = "IDS_CREATE",
PointSize = 16.SpToPx(),
};
createPlaylistCreateButton.TextLabel.FontStyle = UIFontStyles.AllNormal;
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";
}
}
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 };
}
PixelSize = 40.SpToPx(),
FontFamily = "BreezeSans",
FontStyle = UIFontStyles.AllNormal,
- Text = "Create playlist",
+ TranslatableText = "IDS_CREATE_PLAYLIST",
WidthSpecification = LayoutParamPolicies.MatchParent,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
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,
TextField inputTextField = new TextField()
{
Name = "AlertDialogInputField",
- PlaceholderText = "Enter Playlist Name",
+ TranslatablePlaceholderText = "IDS_ENTER_PLAYLIST_NAME",
Text = DefaultPlaylistName,
HorizontalAlignment = HorizontalAlignment.Begin,
PixelSize = 32.SpToPx(),
{
Size2D = new Size2D(336, 96).SpToPx(),
Name = "AlertDialogCreateButton",
- Text = "Create",
+ TranslatableText = "IDS_CREATE",
PointSize = 16.SpToPx(),
};
return createButton;
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(),
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,
};
{
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;
}),
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,
{
private readonly ViewLibrary viewLibrary;
private View rootView;
- private BaseView baseView;
+ private BaseView baseView;
private static readonly string[] TabNames = new string[]
{
"Playlists",
"Albums",
"Artists",
};
-
public ViewManager(Window win)
{
viewLibrary = new ViewLibrary();
rootView = new View()
{
StyleName = "AppBackground",
- Size = new Size(win.Size),
+ Size = new Size(win.Size),
ThemeChangeSensitive = true,
Layout = new FlexLayout()
{
{
baseView = new BaseView()
{
- Title = "Music",
+ Title = "IDS_MUSIC",
MoreButton = true,
SearchButton = true,
};
<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
<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>
<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>