snowflakech / snowbabel

10 stars 9 forks source link

[BUG] 'LanguageKey' is the same for different languages #24

Closed ironshark-sascha closed 5 years ago

ironshark-sascha commented 6 years ago

Snowbabel always takes the lg_iso_2 of the static_language record as LanguageKey, but this makes it impossible to have different language versions like de_CH and de or pt_BR and pt.

AnuBN commented 6 years ago

Hi @ironshark-sascha We highly appreciate your notification. Anyways it is a known issue. We are planning about a fix in a future update. Meanwhile, you can fix the situation with a quick workaround. That is by manually updating 'lg_iso_2' field of these mentioned languages.

For instance, German is 'DE', you can update 'Deutsch (Schweiz)' lg_iso_2 value as 'DH'.

ironshark-sascha commented 6 years ago

@AnuBN thx for the info. The workaround could brake other parts of the application that also use static_language record. You mention a fix in a future update - what do you think how long do we have to wait? 1 month or longer?

AnuBN commented 6 years ago

Hello @ironshark-sascha Actually, I meant you can maintain this workaround by adding additional records for these additional languages. For instance, As I mentioned in the previous comment (German & Swiss German) you can add a new record for Swiss German with new 'lg_iso_2' value. screenshot-pmalive bibushost com 2018-01-05 15-42-14-397 This way you can use both languages without any conflicts. The update you were asking might take more than a month. It takes a huge amount of testing time and we are brewing plans to consider this with TYPO3 version 9 support. Thanks for your interest.

IronSharkDK commented 6 years ago

Hi @WebsiteDeveloper, are there any news on this issue? I saw you updated this issue 26 days ago and also added a milestone version. It would be great if a fix for this issue would be released soon. Can you give us a status update? Cheers!

WebsiteDeveloper commented 6 years ago

@IronSharkDK I'm currently working on the 5.1 release which should fix some other issues and plan to fix this issue soon-ish i currently have to work out some issues with the TER extension key so you can expect a fix in about 2-3 weeks hopefully sooner :)

IronSharkDK commented 6 years ago

@WebsiteDeveloper, thanks for your replay. Cool, we are looking forward to it! Good luck :)

IronSharkDK commented 6 years ago

@WebsiteDeveloper Any news yet? :)

WebsiteDeveloper commented 6 years ago

Unfortunatly i still dont have the TER key. Another Problem i currently have is with testing the changes.

IronSharkDK commented 6 years ago

Thanks for your feedback. Hope you can solve this issue.

IronSharkDK commented 6 years ago

Hi @WebsiteDeveloper, any news? :)

GuillaumeGBzh commented 5 years ago

Hi,

I have the same issue.

Version 5.1.0 does not seem to correct this issue.

There are many languages with this problem :

We need a fix for these languages.

Why not add an extra column to static_languages to override "lg_iso_2" if it is specified? This column will be filled by a TYPO3 update script (lg_iso_2-lg_country_iso_2).

What do you think ?

WebsiteDeveloper commented 5 years ago

The solution you proposed seems nice i didn't have the time to work much on the extension in the last month or two but would appreciate a pull request 😄 Another option i thought about was using the lg_collate_locale field if filled instead of the lg_iso_2 code i think this would fix the issue without any need for customization See https://forge.typo3.org/projects/extension-static_info_tables/repository/revisions/master/entry/ext_tables_static+adt.sql Line 1396/1397

WebsiteDeveloper commented 5 years ago

Basically use the lg_collate_locale field if the value is available and fall back to the lg_iso_2 code

GuillaumeGBzh commented 5 years ago

lg_collate_locale is filled in some cases that don't interest us (German -> de_DE for example).

I prefer to add a custom field specific to the snowbabel extension.

WebsiteDeveloper commented 5 years ago

Sure i would love a PR :) Would be more than happy to review it

WebsiteDeveloper commented 5 years ago

Would love to get some feedback on the now included changes :)

GuillaumeGBzh commented 5 years ago

You have to make a fix on this ticket. 'tx_snowbabel_override_language_key' must be written locale_COUNTRY and not local-country.

This is necessary for TYPO3 to properly consider the locale.

In the same way it is necessary to respect the case.

WebsiteDeveloper commented 5 years ago

@GuillaumeGBzh I released a patch version see https://packagist.org/packages/snowflakech/snowbabel#5.1.1 I will close this for now