14 Replies - 926 Views - Last Post: 27 February 2016 - 03:48 AM Rate Topic: -----

#1 ZeeSam   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 01-September 15

Localizable Project stays on default after publishing

Posted 25 February 2016 - 02:22 AM

So I made a project with two languages. I set Localizable to true, then chose the language I wanted (Arabic), translated everything, saved, then to English, and did the same.

When I debug, the program works fine and transfers between the two languages correctly. The only problem is that after publishing, it doesn't do that, and stays on the Default which is mostly in Arabic.

Can any body tell me what to do?

Of coarse there is some code, please tell me if it is necessary so I could post it.

Is This A Good Question/Topic? 1
  • +

Replies To: Localizable Project stays on default after publishing

#2 0Pain0Gain   User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 116
  • Joined: 15-December 15

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 05:15 AM

Hi

I have had similar problems with other systems like this

Do you have resource files for each language and are these set to be localcopy = true???

Sounds like its defaulting as it cannot find the other language resource file

Hope this helps
Was This Post Helpful? 0
  • +
  • -

#3 ZeeSam   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 01-September 15

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 05:43 AM

Ummmmmmmmmmmmm ... I have .resx files for each form per each language if that's what you mean?

But I don't know where to find 'localcopy'.

When I publish, I use this way ... Then I got a problem that the program can't find my MS Access DataBase, so I went to the setup project -> Right click -> add -> File, And I navigated to my original project's folder and added everything in there. So it's like I manually added them? or not?

This is my first program and I'm honestly confused.

All help appreciated.

Thanks :)/>/>

This post has been edited by ZeeSam: 25 February 2016 - 05:44 AM

Was This Post Helpful? 0
  • +
  • -

#4 TechnoBear   User is offline

  • Lady A
  • member icon

Reputation: 592
  • View blog
  • Posts: 1,587
  • Joined: 02-November 11

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 06:00 AM

Localization is a fairly big thing for a first project, colour me impressed.

The files will show in the Solution Explorer window (usually docked to the right it shows all the project files). View the Properties of each file and make sure that the "Copy to Output Directory" property is set to "copy if newer" or "copy always" depending on your requirements
Was This Post Helpful? 1
  • +
  • -

#5 ZeeSam   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 01-September 15

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 06:08 AM

Hhhhhhhhhhhhhhhhhh, Thanks! You'd probably shoot me if you saw what I got myself tangled into on this project for it being a first.


They are all set to copy always. Any other suggestions?
Was This Post Helpful? 0
  • +
  • -

#6 TechnoBear   User is offline

  • Lady A
  • member icon

Reputation: 592
  • View blog
  • Posts: 1,587
  • Joined: 02-November 11

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 06:27 AM

where is code looking for files? where have you put them?
Was This Post Helpful? 0
  • +
  • -

#7 ZeeSam   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 01-September 15

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 06:35 AM

Okay, I had a variable in Module1 named language as Integer.
If its value=1 then the language is Arabic. if language=2 then English.

So whenever I want to open a form, I use this:


If Module1.language = 1 Then
            Panel1.Controls.Clear()
            CurrentThread.CurrentUICulture = New CultureInfo("ar")
            Dim frmArabic As New LanguagesForm
            frmArabic.ShowDialog()
        ElseIf Module1.language = 2 Then
            Panel1.Controls.Clear()
            CurrentThread.CurrentUICulture = New CultureInfo("en")
            Dim frmEnglish As New LanguagesForm
            frmEnglish.ShowDialog()
        End If

The variable changes when I open LanguageForm and choose the language I want and click OkayButton

This is the way that was in the tutorial I followed. Remember that it works while debugging, but doesn't after publish.

This post has been edited by ZeeSam: 25 February 2016 - 06:37 AM

Was This Post Helpful? 0
  • +
  • -

#8 TechnoBear   User is offline

  • Lady A
  • member icon

Reputation: 592
  • View blog
  • Posts: 1,587
  • Joined: 02-November 11

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 06:38 AM

where are the resx files located in your project?
Was This Post Helpful? 0
  • +
  • -

#9 ZeeSam   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 01-September 15

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 06:54 AM

Two locations:
1. ..\FamilyTreeBuilder\FamilyTreeBuilder\ All the files that are resx
2. ..\FamilyTreeBuilder\FamilyTreeBuilder\bin\Debug\ All the files that are resx

Also .. This is how they show in the project .. since I'm not sure which one you're asking about:

Attached Image
Was This Post Helpful? 0
  • +
  • -

#10 TechnoBear   User is offline

  • Lady A
  • member icon

Reputation: 592
  • View blog
  • Posts: 1,587
  • Joined: 02-November 11

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 07:27 AM

I'm not positive with WinForms but I know for a fact that in ASP.Net there is a particular folder that the resx files have to go into. I'll do a little research and get back to you...

Edit: It seems as though you need to set the Localization Property of each control and the the resx are auto generated so you shouldn't need to reference paths... is this how you have done this?

This post has been edited by TechnoBear: 25 February 2016 - 07:30 AM

Was This Post Helpful? 0
  • +
  • -

#11 ZeeSam   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 01-September 15

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 07:30 AM

I appreciate it... Thanks 😉
Was This Post Helpful? 0
  • +
  • -

#12 ZeeSam   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 01-September 15

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 11:17 AM

Yes .. That's right .. That's how I did it
Was This Post Helpful? 0
  • +
  • -

#13 TechnoBear   User is offline

  • Lady A
  • member icon

Reputation: 592
  • View blog
  • Posts: 1,587
  • Joined: 02-November 11

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 11:26 AM

Then I'm afraid I'm out of my depth here, sorry.
Was This Post Helpful? 0
  • +
  • -

#14 ZeeSam   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 01-September 15

Re: Localizable Project stays on default after publishing

Posted 25 February 2016 - 11:54 AM

It's okay .. thanks though.
Anybody else?
Was This Post Helpful? 0
  • +
  • -

#15 ZeeSam   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 01-September 15

Re: Localizable Project stays on default after publishing

Posted 27 February 2016 - 03:48 AM

Is anybody even reading this anymore? :/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1