Translations: Difference between revisions

From nuBuilderForte
Jump to navigation Jump to search
Line 17: Line 17:
* PHP files
* PHP files
* JS files
* JS files
* inside nubuilder4.sql as data in fields
* inside '''nubuilder4.sql''' as data in fields


Files in libraries have their own translations either as '''gettext''' or '''arrays''' and are not part of the core nuBuilder translations.
Files in libraries have their own translations either as '''gettext''' or '''arrays''' and are not part of the core nuBuilder translations.

Revision as of 03:32, 26 January 2021

This allows you to make alternative phrases in other languages that can be used instead of nuBuilder Forte's English (Australian) phrases.

The translated phrases for all supported languages are stored in the zzzzsys_translate table.

Language

The User's language.

Dialects

Any changes to the English Translation (Australian) for other dialects like UK, US, Indian, etc can be treated as another language (UKEnglish, USEnglish, INEnglish) having the override strings alone with the parent English as fallback for strings not present in these modded dialects.

This method cannot be used directly for dialects of non-English languages where UPDATE statements can be used with base language INSERTs.

English

A translatable phrase used in nuBuilder Forte.

Locations of Translatable Strings

  • PHP files
  • JS files
  • inside nubuilder4.sql as data in fields

Files in libraries have their own translations either as gettext or arrays and are not part of the core nuBuilder translations.

Translation

  • The translated phrase used in the selected language is in the field trl_translation.
  • Can safely delete unused language translations in the zzzzsys_translate table.
  • All system translations will have the ID starting with nu.

Best Practices

  • Technical English key words (in context) are best transliterated like ORDER BY, SORT BY, etc
  • Common easily understood English abbreviations and application specific proper nouns are best left as is like SQL, CSV, nuBuilder, nuDebug, etc
  • Where transliteration of English words can cause confusion with vernacular / colloquial words, proper translation is essential.
  • Keep translations short to fit in button / alert box / menu widths.
  • Practical understanding preferred over grammatically correct phrases in translations
  • Re-arrange order of translated words to accommodate prefix / suffix of variables to match the English context
  • Prim and proper exact translations that are not common or require a deep knowledge of the target language should be substituted for those in common parlance / vogue.

Edit in MySQL

-- first import proposed translations and view the differences

SELECT a.*, b.trl_translation FROM nubuilder45.zzzzsys_translate a INNER JOIN nubuilder45.proposed_translate b USING (zzzzsys_translate_id) 
WHERE a.trl_translation <> b.trl_translation;

-- manual corrections

-- Backporting

SELECT a.*, b.trl_translation FROM nubuilder4.zzzzsys_translate a INNER JOIN nubuilder45.zzzzsys_translate b USING (zzzzsys_translate_id) 
WHERE a.trl_translation <> b.trl_translation;

/*
update nubuilder4.zzzzsys_translate a INNER JOIN nubuilder45.zzzzsys_translate b USING (zzzzsys_translate_id) 
SET a.trl_translation = b.trl_translation
WHERE a.trl_translation <> b.trl_translation;
*/

Supported Languages

Translation Stats

/* Translation Stats */
SELECT trl_language
  , COUNT(*) AS translated_strings
  , (SELECT COUNT(DISTINCT trl_english) FROM `zzzzsys_translate` a)-COUNT(*) AS ToTranslate 
FROM `zzzzsys_translate` GROUP BY trl_language ORDER BY translated_strings DESC;

/* Find Duplicates in all langages */
SELECT trl_language, trl_english, COUNT(*) AS records FROM `zzzzsys_translate` 
GROUP BY trl_language, trl_english HAVING records > 1;

/* Missing Strings */
SET @lang:='German'; -- choose your language here

SELECT a.trl_english
FROM `zzzzsys_translate` a LEFT JOIN 
(SELECT b.trl_english FROM zzzzsys_translate b WHERE b.trl_language = @lang) lang
USING (trl_english)
WHERE lang.trl_english IS NULL
GROUP BY a.trl_english;

NuBuilder v4 Updated Version, v4.5

Bold indicates 100% Translation of 211 strings available in v4 | Status

Bold and Italic indicates nearly or 100% Translation of 262 strings available in v4.5+ | Status

Translation maintainers Forum usernames are in brackets.

  • Arabic
  • Armenian
  • Chinese
  • Czech
  • French
  • German (kev1n)
  • Greek
  • Hindi (nc07)
  • Italian
  • Malay
  • Russian
  • Spanish
  • Tamil (apmuthu)
  • Vietnamese