English
日本語
Date, Time, Currency Rate
Japan:
Fri, 11/14/2025, 4:12 AM
Central USA:
Thu, 11/13/2025, 1:12 PM
Currency: 1 USD = 154.42 JPY
as of 11/13/25 19:00 UTC

(本戸) クラーブ 律子

Ritsuko (Hondo) Crabb

X

Website Translation

Post Date: March 12, 2025 -- Categories: Technical Matters

I see this website as a new journey upon which Ritsuko and I have embarked, and as we begin, I want to explain a key feature of the site. That key feature is our implementation of translating the site content from Japanese to English and from English to Japanese.

After evaluating several methods, we came to the conclusion that none were perfect in the accuracy of translation, but the method that came closest to what we wanted was the Google Translate Element. Therefore, we began developing the site with the idea of using Google Translate Element to facilitate language translation.

However, as we progressed in the site's development, we came to realize that this was not a satisfactory solution. Although the accuracy was very impressive, too often, the translation, while being linguistically accurate, did not express the nuanced meaning intended by the author. Also, some words, especially those written in katakana, were misinterpreted, and in some cases, the original language text needed to be altered in order to change the translated outcome. Writing can be stressful enough without the addition of these issues. With artificial intelligence continually advancing, all this will surely improve in the future, but in its present state, we found the shortcomings to be a roadblock to our satisfactorily completing our project.

We decided that the best solution for us to offer the site content in both languages would be to write the content in both languages, and then provide a language selector that would allow the reader to toggle between English and Japanese content. So, I altered the database structure to include storage for article and page text, title, and description in both languages. Also, in the database table where media data is cataloged, there can now be both an English and Japanese description for each picture and video. For some words that were hard coded in either static content or in dynamically generated content, I built a database table for storing text in both languages relating to a key word or phrase. Thus we now have a translate table to facilitate the display of those text items in either language.

I won't go into a lot of detail about how all of this works, but essentially, when a page is first displayed, it will be in the language defined for the page or article. If language selection on that page or article is allowed, a language selector, consisting of two buttons, will appear in the top left corner of the page. Changing the selector to a different language will cause a JQuery script to send an AJAX request to the server containing the page, article, and requested language. The receiving script in the server then calls a PHP function that will generate a response consisting of any relevant replacement data in the requested language that exists in the database for that particular page or article. The JQuery AJAX success handler then replaces that data in the page the reader is viewing.

Writing content in two languages might seem quite tedious, but we think that the outcome is well worth the effort. That is because our goal is for the reader to be able to enjoy the primary content ... Ritsuko's stories ... accurately represented in either language.

In order to reach that outcome, as with any journey, we have found it necessary to sometimes change course in order to reach our desired destination.

 | Published by: RitsukoCrabb.com  logo
 | Date Modified: July 30, 2025

Articles Menu

X