VAY Posted September 29, 2016 Share Posted September 29, 2016 Hello I am absolutely new to Cubecart. Strait to my point, I have developed my site in two languages, one is default English and the other is Lao language. as my language is not there available in Marketplace s I have added and edited Lao at Admin ACP, translating phrases, text here. Now I have researched some instructions in this Forum, but I what my search results seem to be vague for me. At (test) store front my language flag is there available from Drop-down between English(UK) and Lao. But when clicking it does not change to Lao language. At ACP, one problem I have found is that Lao language from languages list, which I have created and edited cannot be edited when clicked from the list. It should to "Edit Phrases" page so that I can translate text or phrases at "Phrase Group" (I have an attached for this). Please suggest me where I should go from now to get my language translated. Please give me suitable suggestion links. Regards Vay Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 29, 2016 Share Posted September 29, 2016 Welcome to the forums @VAY! Please show what you have as the name of your language file and the code comparable to this top section of the en-US.xml file: <?xml version="1.0" encoding="UTF-8"?> <language version="2.0"> <info> <title>English (US)</title> <code>en-US</code> <character_set>utf-8</character_set> <version>1.0.0</version> <minVersion>5.0.0a</minVersion> <maxVersion>5.1.*</maxVersion> <default_currency>USD</default_currency> <text-direction>ltr</text-direction> <override></override> </info> <translation> Quote Link to comment Share on other sites More sharing options...
VAY Posted September 29, 2016 Author Share Posted September 29, 2016 22 minutes ago, Dirty Butter said: Welcome to the forums @VAY! Please show what you have as the name of your language file and the code comparable to this top section of the en-US.xml file: <?xml version="1.0" encoding="UTF-8"?> <language version="2.0"> <info> <title>English (US)</title> <code>en-US</code> <character_set>utf-8</character_set> <version>1.0.0</version> <minVersion>5.0.0a</minVersion> <maxVersion>5.1.*</maxVersion> <default_currency>USD</default_currency> <text-direction>ltr</text-direction> <override></override> </info> <translation> Thanks for your time reading through my issue, Dirty Butter . Here are my language file: lo-LA.xml ; and the following code: <?xml version="1.0" encoding="UTF-8"?> <language version="2.0"> <info> <title><![CDATA[ລາວ]]></title> <locale>lo</locale> <character_set><![CDATA[utf-8]]></character_set> <version>1.0.0</version> <minVersion>6.0.12</minVersion> <maxVersion>5.0.*</maxVersion> <parent_language><![CDATA[en-GB]]></parent_language> <override_parent>true</override_parent> </info> </language> Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 29, 2016 Share Posted September 29, 2016 I hope the information you have provided will be useful to someone who is knowledgeable about creating a language. Sorry, but I am not able to help you with this. Hopefully someone will be along shortly who can. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 29, 2016 Share Posted September 29, 2016 When you click the Edit icon, what does happen? When the mouse hovers over the icon, does the browser show a target address somewhere (usually at the bottom of the window)? Quote Link to comment Share on other sites More sharing options...
VAY Posted September 30, 2016 Author Share Posted September 30, 2016 Hello bsmither. Thanks for being here around my issue. When click on Edit icon it seems it goes somewhere or where it should go but just staying there at the same page of list of languages (Dashboard >Settings >Languages). When the mouse hovers over the icon, the browser show the same target address as at address bar or address box. While at the storefront, clicking and hovering the Lao language flag, the address is "https://eatpro.net/index.php?" At the file manager, languages directory, can I just copy en-GB.xml and rename the copied file to lo-LA.xml, and translate the text/phrases in lo-LA.xml? Or what am I exposed to do more with tools at ACP: "Merge to file", "Using the Language File" and "Import Language"? Please give some suggestions. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 30, 2016 Share Posted September 30, 2016 The way CubeCart is supposed to work is that any language file will overwrite the keys from definitions.xml. This is desirable because as more phrase strings get added to core CubeCart code, all the phrases will always be in definitions.xml. Then, each individual language pack can catch up with its own translated phrases for the new strings -- not leaving anything blank. Your header block as copied from above: <?xml version="1.0" encoding="UTF-8"?> <language version="2.0"> <info> <title><![CDATA[ລາວ]]></title> <locale>lo</locale> <character_set><![CDATA[utf-8]]></character_set> <version>1.0.0</version> <minVersion>6.0.12</minVersion> <maxVersion>5.0.*</maxVersion> <parent_language><![CDATA[en-GB]]></parent_language> <override_parent>true</override_parent> </info> </language> Suggested header block: <?xml version="1.0" encoding="UTF-8"?> <language version="2.0"> <info> <title><![CDATA[ລາວ]]></title> <code>lo-LO</code> <character_set>utf-8</character_set> <version>1.0.0</version> <minVersion>5.0.0a</minVersion> <maxVersion>6.0.*</maxVersion> <default_currency>LAK</default_currency> <text-direction>ltr</text-direction> <override></override> </info> <translation> groups and strings </translation> </language> You should use lo-LO.xml and email_lo-LO.xml for the file names (not have LA as that is for Latin, and to do so would mean Latin is a dialect/variant of Laotian). If the header block you were given came from CubeCart's Create Language tab, we need to review that. The "groups and strings" seen in the suggested header block can be compared to the en-US.xml file. And, you can copy the entirety of <group><string> nodes from definitions.xml, but nothing else. Quote Link to comment Share on other sites More sharing options...
VAY Posted September 30, 2016 Author Share Posted September 30, 2016 1 hour ago, bsmither said: The way CubeCart is supposed to work is that any language file will overwrite the keys from definitions.xml. This is desirable because as more phrase strings get added to core CubeCart code, all the phrases will always be in definitions.xml. Then, each individual language pack can catch up with its own translated phrases for the new strings -- not leaving anything blank. Your header block as copied from above: <?xml version="1.0" encoding="UTF-8"?> <language version="2.0"> <info> <title><![CDATA[ລາວ]]></title> <locale>lo</locale> <character_set><![CDATA[utf-8]]></character_set> <version>1.0.0</version> <minVersion>6.0.12</minVersion> <maxVersion>5.0.*</maxVersion> <parent_language><![CDATA[en-GB]]></parent_language> <override_parent>true</override_parent> </info> </language> Suggested header block: <?xml version="1.0" encoding="UTF-8"?> <language version="2.0"> <info> <title><![CDATA[ລາວ]]></title> <code>lo-LO</code> <character_set>utf-8</character_set> <version>1.0.0</version> <minVersion>5.0.0a</minVersion> <maxVersion>6.0.*</maxVersion> <default_currency>LAK</default_currency> <text-direction>ltr</text-direction> <override></override> </info> <translation> groups and strings </translation> </language> You should use lo-LO.xml and email_lo-LO.xml for the file names (not have LA as that is for Latin, and to do so would mean Latin is a dialect/variant of Laotian). If the header block you were given came from CubeCart's Create Language tab, we need to review that. The "groups and strings" seen in the suggested header block can be compared to the en-US.xml file. And, you can copy the entirety of <group><string> nodes from definitions.xml, but nothing else. Thanks bsmither, it works now when changing from lo-LA.xml to lo-LO.xml, and I can edit text and phrases from ACP now. But, at language directory, I do not have email_lo-LO.xml. Should I copy email_en-GB.xml and rename it? How about the file email_definitions.xml, should I copy it too? For text and phrases, do I need to edit every single text and phrases as I need to translate only the ones that are related to storefront and to customers? If I do not translate all, will it affect the Laotian UI at storefront? Anyway, thank you for your help on my first ecommerce site using Cubecart. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 30, 2016 Share Posted September 30, 2016 You can take a copy of email_en-US.xml, rename it to email_lo-LO.xml, and edit the <emails> node to match the country code. Then proceed to edit the wording. There are phrases that are shared and used in both front and back ends. I find that even at this latest version of CubeCart, there are still some anomalies that happen regarding the use/display of the phrase strings. As such, the least crazy approach is to translate as much as possible (perhaps prioritizing the storefront), then in admin, Administrators, Edit your admin account, and select the language you want to use for yourself. Quote Link to comment Share on other sites More sharing options...
VAY Posted September 30, 2016 Author Share Posted September 30, 2016 Thanks bsmither. Your suggestions are such a useful for a new developer like me. If it would not distract you much, in the future, I would ask you for more assistance, as I would have a lot of headaches I think. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 30, 2016 Share Posted September 30, 2016 Feel free to post a PM with your email address and a short description of how I can help -- with things that cannot be or are too esoteric for the forums. Otherwise, let's keep it in the forums to benefit everyone. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.