I've been working on the localisations of a WP7 app and although most of the languages appear to operate as expected at runtime I'm having trouble with a few.
For example, Russian, Polish, Swedish, Norwegian, Portuguese and Hungarian don't appear to be working but both Traditional & Simplified Chinese, Greek and Danish do (there are other languages which also work).
The app's neutral culture is set to "en", although I also tried "en-GB" originally.
I'm sure it's something to do with culture codes as I can't find any reference to similar problems with partial language support anywhere.
I've enabled the following cultures within the project file itself:
<SupportedCultures>en;da-DK;de-DE;el-GR;es;es-ES;de-DE;fr;fr-FR;it-IT;zh-TW;zh-CN;hu-HU;no;nb-NO;pt-PT;pl-PL;ru;ru-RU;sv-SE;</SupportedCultures>
In that list, everything up to Hungarian seems to be fine. I've also tried adding short culture codes and duplicating resource files accordingly (e.g. Russian and Spanish) in case I'd got it completely wrong, but even the MSDN documentation seems to indicate that all the above are supported on WP7.1.
Example use of resource in XAML:
<TextBlock Text="{Binding Path=LocalisedResources.res_Name,
Source={StaticResource LocalisedStrings}}" />
Happy to provide more detail on the implementation to assist answers but I'm sure it's just something simple I've missed (i.e. PEBKAC). I've checked that all the resource files have the same attributes, correct spelling e.g. Resource\Resources.hu-HU.resx, Public modifiers and only contain string resources.
Using VS2010, WP OS 7.1 and the standard emulator to check & test.
Has anyone encountered anything similar, or know of any steps to try and resolve?
Thanks
Fixed it.
Not 100% sure what the problem was but cleaned / deleted bin folder content manually / rebuilt solution and it's working in all languages.
It looks like something got caught between builds and was not correctly deployed during emulator testing but I can't see anything in the build output or output console to indicate exactly what that was.
Related
I get this error only at design-time.
At runtime everything works just fine. There is absolutely nothing wrong with I-Synergy.Resources class library.
I've searched for this error intensively but no solution.
(already tried:
reset settings VS
clear and rebuild solution
delete obj and bin folders
checked all references and dependencies
converted pcl to regular class library
)
As you probably know, there a lot of questions regarding the notorious "Could not load file or assembly" error many times creeping up our XAML designer.
After reading all the provided solutions, and sadly non of them working for me, I started to investigate this annoying issue.
I spend 4 days trying to figure this out. Luckily today I found the answer to my problem.
In my solution design I created several projects under the WPF application called I-Synergy. Among others I added assemblies named I-Synergy.Controls and I-Synergy.Resources (where I put all my Resource strings, static classes and images).
This last assembly seems to caused this error. Even I don't have any Resouces file (or any other local reference inside the WPF application) it somehow got confused with my I-Synergy.Resources project.
Solution:
I changed the I-Synergy.Resources project to I-Synergy.Library (assembly name and namespaces) and the error has gone. Probably the "Resources" name is a no-go and can be considered as a reserved word.
my final job on my current site is trying to add multi language capability to my EE site.
The steps I followed on the wiki here: http://expressionengine.com/wiki/Multi_language_site_alternative
were straight forward enough and despite having to search around for a bit of help when the htaccess didn’t work, I now have (I believe) a working subfolder on my site: /en . If i point my browser at http://mysite.com/en/template_group/view/title a page comes up fine.
The next step however of using en_custom_field doesn’t seem to work.
I have the feeling that the /en folder is an exact mirror image of the normal site.
For example in my embedded header template I have lang=”{country_code}” but when I view source in my /en subfolder it shows as “fr” (which is the default language)
Also, other curious things are happening - in the /en subfolder, my current dropdown menu (a navee menu) has been replaced by my old menu which is no longer in my template (!) I have literally no idea how this is happening…
Would appreciate any help from anyone who's seen something familiar thanks!
Are you using ExpressionEngine 1.x or 2.x ? The instructions in the wiki really only work for 1.x (and not even very well for that).
There are several free and paid addons that can help you do this. For EE1, I'd recommend Transcribe: http://eeharbor.com/transcribe
For EE2, you might try Berkol's MultiLanguage addon, found here: http://devot-ee.com/add-ons/multi-language-support -- it requires you to create custom fields, but handles all the URL nonsense pretty nicely as far as I can tell.
I am tasked with the localization of a Windows Phone 7 application. The first step is to replace the actual visible text with an ID and put the ID and the text in a resource file.
This is a very tedious work and I was wondering if there are tools for this to automate?
I am thinking along the lines of the gettext package and .po files used in the linux world.
Here is a codeplex project that may help you some. http://xlocalization.codeplex.com/. To use this method, each control that is to be localized must have the name property assigned.
I tried it with my existing project, and got results that were mixed, but in the long run, I decided to do it by hand. I don't remember specifically what the problems were that I had, but if you want to try it on a copy of your project, it won't take much time. If it works for you (and if your controls to be localized all have names), it could save you time.
Also, I don't know how familiar you are with localizing, but I wrote a blog on the subject that takes you from start to finish. It's at http://www.hopnet.mobi, click Blogs.
Hope this helps.
I know this will get a lot of traditional answers, but I would also like to put forward something completely original we tried (and succeeded) doing ourselves for more efficient localisation of Silverlight using Attached Properties instead of binding:
Localisation of Silverlight projects after completion
To pre-populate the database we wrote a XML parser to find our markers in all our project's XAML files (XAML is just a subset of XML after all). We could not find any existing tools to do what you suggested, but our requirements were simplified by our new method of localisation (no resource files and no horrid bindings).
(yes, this is almost the same answer as a previous one of mine today, but it seems to fit again).
Also for future reference keep an eye out for this tool: http://www.neovelop.com/ This tool will go in private beta soon and looks very promising. Judging from their preview movie this will do exactly what you asked for.
I have a SL 4.0 application hosted on IIS with a possibility to change GUI language. The problem is that hosted on one machine , language functionality works and on the other machine not. Inside this piece of code:
Thread.CurrentThread.CurrentCulture = new CultureInfo(message.NewCulture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(message.NewCulture);
on Windows7 it does update UICulture with correct resource file and on Windows Server 2008 it does not. IIS settings on both systems seem to be the same. Any suggestions where to look?
You might want to take a look at the Blog entry made by Tim Heuer on the subject.
http://timheuer.com/blog/archive/2009/08/26/silverlight-string-localization.aspx
Using this blog post, I was able to get Globalization/Localization implemented in a short amount of time and minimal effort.
It sounds like you need to take a look at the Access Modifier section in the designer. You'll need to set this to Public in order to use it in XAML binding. Also check that all the RESX files are marked as Embedded Resource in the properties for the files.
Additionally make sure your string resource dictionaries have extensions to something similar:
P.S. I hope you'll read Tim's blog entry, he goes into a lot more detail than what I've explained. Also from my personal experience, I wasn't able to dynamically reload the language on the fly until I took a look the section on the blog post titled "Public modifier workaround and dynamically setting the culture".
R-Click the assembly(ies) containing your localized files, select unload project and then edit the project file(s). The project files are in XML format. Look for a XML tag related to SupportedCultures (or something like that). Make sure that your cultures are in the list.
Localization didn't want to kick in for me until I got that resolved.
I'm trying to find out if Embedded Open Type (.eot) files can be used in Silverlight. I found an older post that says they can't, but it's a few years old and given how fast SL has moved, I'm not sure if that has changed.
If so, how would they be used? As a <Glyph/> object or...?
I don't think so. You can embed true type fonts fonts in your Silverilght app though. Expression Blend makes it easy to do, simply select a font and then tick the 'embed' box. You would of course need to make sure you met any font licensing requirements for fonts that you embed in your application.
The fonts are embedded as a zipped resource within your dll via a custom build action called 'BlendEmbeddedFont' and then referenced like this in your app:
<TextBlock Text="TextBlock" FontFamily="/SilverlightApplication12;component/Fonts/Fonts.zip#Segoe UI" />
No. This is because Silverlight (like Flash) thinks of itself as an "application", not a "document". There's a lot of banter on this subject of font embedding vs. linking and web fonts. Silverlight incorrectly uses the word "embed" where it actually "links" instead.
Like any good technology though, it may be possible to reverse engineer an EOT file though - these security guys did it using IE: Reverse Engineering the Embedded OpenType Decompression. I don't think would be illegal in any way as the compression/decompression is a submission to W3C on http://www.w3.org/Submission/2008/SUBM-MTX-20080305/ (although it may make the font foundries a little angry). Or maybe you could look at this ttf-to-eot converter and do the reverse: http://code.google.com/p/ttf2eot/
Anyway, you have a lot of work ahead of you if you want to go down this path.