Giter Site home page Giter Site logo

localization's Introduction

localization's People

Contributors

bdovaz avatar rosselm avatar yasinkuyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

localization's Issues

Aktif Dil ?

Öncelik çalışman çok güzel olmuş.
Aktif Dil Razor tarafında nasıl alabiliriz.

Null reference on ReadCookie and sharing classes between projects

I have a big solution with multiple projects. The output are managed by two projects: an ASP MVC application and a WPF application.

There is a datamodel project shared between them with "DisplayLocalized" attribute in them. My problem is that when in the WPF application is instantiated any data model class, it throws a NullReferenceException on "ReadCookie" method because "HttpContext.Current" is null.

Can your return the original "id" like you do when there are no results for that "id"? That way it should not crash and since in WPF I don't use that attribute it doesn't matter.

I can do it myself but since I'm using your nuget package, it's a pain to deal with that because if there is an update in your package it will broke my project again.

Where to put DefaultLocale( ) method?

I don't really know where to put the DefaultLocale( ) method I could find in the Readme. I've installed the 1.0.7 version, then I upgraded it to 1.0.8 with nuget.

I have a controller which looks like this now:

`
public class LocalesController : Controller
{

    public ActionResult Index(string lang = "hu_HU")
    {
        Response.Cookies["CacheLang"].Value = lang;

        if (Request.UrlReferrer != null)
            Response.Redirect(Request.UrlReferrer.ToString());

        var message = Localization.Get("changedlng");

        return Content(message);
    }



}

`

But the default language for the site is still english.

Can you specify where to modify the code to set another default language?

Thank you very much!

Inherit

Hello.
Thank you for great nuget that help me.
But I'm try add ar = "" to inline code but not working
public class ARInline : Inline
{
public ARInline() { }
public ARInline(string ar = "", string en = ""){ }
public string ar_SA { get; set; }
}

regards.

XML comment lines

Null reference error when using comment tags () in the language XML files.

Error while trying to create a Code First Migration

I'm trying to create a migration, but an exception occurs...

The thing is that there is no HttpContext when run in a console command. And for some reason the migration tool wants to reads this attribute value. This makes the Localization to be initialized.

PM> Add-Migration Initialize
System.NullReferenceException: Object reference not set to an instance of an object.
   at Insya.Localization.LocalizationStartup.GetLang(String id) in D:\DEV\PROJELER\InsyaCMS\Insya.Localization\src\LocalizationStartup.cs:line 37
   at Insya.Localization.Attributes.DisplayLocalizeAttribute.get_DisplayName() in D:\DEV\PROJELER\InsyaCMS\Insya.Localization\src\Attributes\DisplayLocalizeAttribute.cs:line 38
   at System.ComponentModel.DisplayNameAttribute.GetHashCode()
   at System.Collections.Generic.ObjectEqualityComparer`1.GetHashCode(T obj)
   at System.Linq.Set`1.InternalGetHashCode(TElement value)
   at System.Linq.Set`1.Find(TElement value, Boolean add)
   at System.Linq.Enumerable.<ExceptIterator>d__99`1.MoveNext()
   at System.Linq.Enumerable.<OfTypeIterator>d__aa`1.MoveNext()
   at System.Data.Entity.ModelConfiguration.Conventions.PropertyAttributeConfigurationConvention`1.<.ctor>b__0(ConventionTypeConfiguration ec)
   at System.Data.Entity.ModelConfiguration.Conventions.TypeConvention.ApplyCore(Type memberInfo, ModelConfiguration modelConfiguration)
   at System.Data.Entity.ModelConfiguration.Conventions.TypeConventionBase.Apply(Type memberInfo, ModelConfiguration modelConfiguration)
   at System.Data.Entity.ModelConfiguration.Configuration.ConventionsConfiguration.ApplyModelConfiguration(Type type, ModelConfiguration modelConfiguration)
   at System.Data.Entity.ModelConfiguration.Conventions.Convention.ApplyModelConfiguration(Type type, ModelConfiguration modelConfiguration)
   at System.Data.Entity.ModelConfiguration.Configuration.ConventionsConfiguration.ApplyModelConfiguration(Type type, ModelConfiguration modelConfiguration)
   at System.Data.Entity.ModelConfiguration.Mappers.TypeMapper.MapEntityType(Type type)
   at System.Data.Entity.DbModelBuilder.<>c__DisplayClassd.<MapTypes>b__7(Type type)
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   at System.Data.Entity.Utilities.IEnumerableExtensions.Each[T](IEnumerable`1 ts, Action`1 action)
   at System.Data.Entity.DbModelBuilder.MapTypes(EdmModel model)
   at System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)
   at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)
   at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)
   at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)
   at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
   at System.Data.Entity.Internal.LazyInternalContext.get_ModelBeingInitialized()
   at System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(DbContext context, XmlWriter writer)
   at System.Data.Entity.Utilities.DbContextExtensions.<>c__DisplayClass1.<GetModel>b__0(XmlWriter w)
   at System.Data.Entity.Utilities.DbContextExtensions.GetModel(Action`1 writeXml)
   at System.Data.Entity.Utilities.DbContextExtensions.GetModel(DbContext context)
   at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration, DbContext usersContext, DatabaseExistenceState existenceState, Boolean calledByCreateDatabase)
   at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration)
   at System.Data.Entity.Migrations.Design.MigrationScaffolder..ctor(DbMigrationsConfiguration migrationsConfiguration)
   at System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldRunner.Run()
   at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
   at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
   at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
   at System.Data.Entity.Migrations.Design.ToolingFacade.Scaffold(String migrationName, String language, String rootNamespace, Boolean ignoreChanges)
   at System.Data.Entity.Migrations.AddMigrationCommand.Execute(String name, Boolean force, Boolean ignoreChanges)
   at System.Data.Entity.Migrations.AddMigrationCommand.<>c__DisplayClass2.<.ctor>b__0()
   at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)

How to change default language

I have a problem with default language. I deleted English and Turkish. I use other languages, but there is no initial cookie it crashes, because it want's en_EN.xml that I deleted. How to change this?

Set the default language

First I want to thank you for this great plugin.
Is there a way to change the default language?

Localization klasör değişimi

Güzel bir çalışma eline sağlık. Oldukça yararlı fakat takıldığım bir nokta var Localization klasörü root a ekleniyor bu klasörün yolunu değiştirmeye yönelik bir ayar göremedim.Böyle bir planın var mı?

get the id

Hi,
I always get the ID, in my bar menu the first time that I load the web, instead of the content of the ID.
Only when I refresh the web, I get all the translations.
Can I fix this in any way?

Thank you very much!

image

Language content update on server not working?

When I test locally, when I update some translations, after refresh everything works.
But when I get it on server, if I update something in .xml nothing happens, even if I delete that xml the content stays the same?

Çerezi elle değiştirince hata

System.IO.FileNotFoundException:
WEB.UI\Localization\deger_DEGER.xml' dosyası bulunamadı.

varsayılan dile yönlendirebilir...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.