Open JoshWobbles opened 7 years ago
Yes, the default text or the key should be shown Unfortunately (I do not know why) the Tx does not show actual data. It's only one issue to the Tx
There is no dictionary available at design time because it's loaded through runtime code. I have thought about supporting this somehow but couldn't find a solution. After all, you could even build up the dictionary content through code and not use a .txd file at all.
So there are only two possibilities what can happen at design time:
How do I set the default text? English is green but at design time all my text just shows the key names.
Just look around in the TxEditor source code, it's full of it. TxEditor is a good reference on how to use the TxTranslation library in general.
I do not know, how it works in WPF designer, but for Xamarin Forms Previewer I've made changes in TxLib and it shows actual data from txd file. I think it would work for WPF designer. Also I've ported TxLib into PCL. This fork works but it's very raw unfortunately.
I'd like to say thank you very much for the great TxTranslation, best ever system for string resources managing!
Today I've finished to work on fork of the TxEditor for export into Android resources and CSharp code files.Next is export to iOs resource files. I'm totally amazed capability and potential of TxTranslation! The code inside is very elegant and clear. When I've finish this solution I'd like to offer pull request to TxLib
I've have only one question why so few people use this amazing and no doubt uniqe library
I have no experience with Xamarin.Forms yet, but it's right next on my list. Could you show me how the dictionary text is displayed at design time there?
I also intend to add .NET Standard support to TxLib, for one of my projects, but there's no definitive time frame yet. Should be still in 2017.
I load a txd file from embedded resources in the constructor of main App class.
Stream stream = Auxiliary.ResourceLoader.GetStream("Resources.Dictionary.txd");
//Tx.SetCulture("ru-RU");
Tx.SetCulture("en-US");
Tx.LoadFromStream(stream);
and make bingings
This works only for current alfa version of Xamarin Form Previewer. And I've slightly changed the TxLib Here is a small demo https://github.com/vlkam/HardwareStore
I think this approach would be work for WPF designer because it also executes main App class in process of working
If you have any questions I'm happy to answer.
Once again, thanks a lot for really stunning library and awesome TxEditor!
Shouldent design time show the default text, or at least the key?