Post by HAO » Thu May 11, 2023 1:36 pm

I translate the language files myself, I made sure I translate my language file the way it is in English.

I also made sure my language id is set to 2, And the MySQL language content I translated can be displayed normally.

OpenCart 4.0.2.1
Image

Image

Image

Image

But why can't I load my language file directory correctly?

My language file directory and file name, I hope to be: zh-tw.

How can I solve this problem?

Can someone help me?

Thank you!
Last edited by HAO on Mon May 15, 2023 2:14 am, edited 4 times in total.

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by straightlight » Thu May 11, 2023 8:09 pm

OC version. Language switching issue has already been reported on the Github Opencart repository.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by HAO » Thu May 11, 2023 9:16 pm

So you mean it has nothing to do with my translation, it's a problem with this version itself?

If so, why does this version simply remove the MySQL fields for the directory name?

I think the old way works fine.

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by by mona » Thu May 11, 2023 9:32 pm

OC4 is not suitable for production sites (assuming that you posted in the correct forum)
If your purpose is to report the bug without the specific OC version it is likley to be ignored.

Please follow the forum rules before posting.
Minimum requirement is OC version / themes and any relevant extensions.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by HAO » Thu May 11, 2023 10:52 pm

Doesn't the screenshot I provided explain it?
OpenCart 4.0.2.1

I'm working on a translation, I just want to confirm my translation.

I don't intend to officially run this site.

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by by mona » Thu May 11, 2023 11:50 pm

HAO wrote:
Thu May 11, 2023 10:52 pm
Doesn't the screenshot I provided explain it?
OpenCart 4.0.2.1

I'm working on a translation, I just want to confirm my translation.

I don't intend to officially run this site.
Well the screenshots were not there when you asked ::)
Thank you for adding a OC version.

I am sure this will be added at some point to the long list of things to be fixed.
In the meantime the community will be most grateful if you come back with any fix you come up with .. then the list will get shorter :)


In order to point you in the right direction
https://www.opencart.com/index.php?rout ... n_id=44060
https://www.opencart.com/index.php?rout ... egory_id=2
and
https://github.com/opencart/opencart/issues/12290

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by HAO » Fri May 12, 2023 12:47 am

HAO wrote:
Thu May 11, 2023 10:52 pm
Doesn't the screenshot I provided explain it?
OpenCart 4.0.2.1

I'm working on a translation, I just want to confirm my translation.

I don't intend to officially run this site.
Well the screenshots were not there when you asked ::)
Thank you for adding a OC version.

I am sure this will be added at some point to the long list of things to be fixed.
In the meantime the community will be most grateful if you come back with any fix you come up with .. then the list will get shorter :)


In order to point you in the right direction
https://www.opencart.com/index.php?rout ... n_id=44060
https://www.opencart.com/index.php?rout ... egory_id=2
and
https://github.com/opencart/opencart/issues/12290
I just wrap the screenshots in the post using hyperlinks.

Because the default BBCode image of phpBB contains hyperlinked BBCode is too complicated. (Didn't you notice it then?)

Anyway I follow this link to modify the file and it still doesn't work, and I have my flag image file, but it doesn't show up.
https://github.com/opencart/opencart/issues/12290

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by by mona » Fri May 12, 2023 1:43 am

ok - let us know if you find a solution

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by xxvirusxx » Sat May 13, 2023 2:43 am

Make this changes admin and catalog side, but for catalog change admin with catalog (line 23)

https://github.com/opencartbot/opencart ... 3407649ea4
https://github.com/opencart/opencart/is ... 1437666647

As per file use default.php instead of zh-tw.php

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by HAO » Mon May 15, 2023 1:43 am

xxvirusxx wrote:
Sat May 13, 2023 2:43 am
Make this changes admin and catalog side, but for catalog change admin with catalog (line 23)

https://github.com/opencartbot/opencart ... 3407649ea4
https://github.com/opencart/opencart/is ... 1437666647

As per file use default.php instead of zh-tw.php
Okay, I have followed your modification steps to solve the problem.

The same steps are also modified in the catalog directory:

Code: Select all

				$this->language->addPath(DIR_EXTENSION . $language_info['extension'] . '/catalog/language/');
			} else {
				$this->language->addPath(DIR_LANGUAGE);
			}
Thanks again for your help!

PS. The button text during installation cannot be displayed.

Because I am a complete translation of MySQL default data, So there are two languages after installation.

So anyone want to fix the button problem to load this file:
upload/install/language/zh-tw/default.php

Please continue the discussion.

Attachments

Screenshot 2023-05-15 at 01-12-13 授權合約.png

Screenshot 2023-05-15 at 01-12-13 授權合約.png (87.01 KiB) Viewed 4913 times


HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by by mona » Mon May 15, 2023 7:38 pm

+1

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by xxvirusxx » Tue May 16, 2023 3:19 am

HAO wrote:
Mon May 15, 2023 1:43 am
PS. The button text during installation cannot be displayed.
I didn't tested/or made translation for install...because I was not interested....

So just wait....
I made my own translation but because of opencart bugs...was not published on Marketplace.....and 90% possible will not be published...and will remain on my private repo, but maybe after 2-3 years I will used :laugh:

LE: Start to think to switch to Magento :)

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România
Who is online

Users browsing this forum: No registered users and 2 guests